login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A237451
Zero-based column index to irregular tables organized as successively larger square matrices.
6
0, 0, 1, 0, 1, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5
OFFSET
1,8
COMMENTS
With sequences constructed of successively larger square matrices (cf. A074279), a(n) will return the distance of n from the left edge of the matrix that n is located in, with 0 standing for the leftmost column (please see the Example section).
A237452 gives the corresponding row index.
A238013 and A121997 give these same row and column indices, starting the numbering with index 1. - M. F. Hasler, Feb 17 2014
FORMULA
a(n) = (A064866(n)-1) modulo A074279(n).
a(n) = A121997(n)-1. - M. F. Hasler, Feb 16 2014
EXAMPLE
This irregular table begins as:
0;
0,1;
0,1;
0,1,2;
0,1,2;
0,1,2;
0,1,2,3;
0,1,2,3;
0,1,2,3;
0,1,2,3;
0,1,2,3,4;
0,1,2,3,4;
0,1,2,3,4;
0,1,2,3,4;
0,1,2,3,4;...
PROG
(Scheme) (define (A237451 n) (modulo (-1+ (A064866 n)) (A074279 n)))
(Python)
from sympy import integer_nthroot
def A237451(n): return (n-(k:=(m:=integer_nthroot(3*n, 3)[0])+(6*n>m*(m+1)*((m<<1)+1)))*(k-1)*((k<<1)-1)//6-1)%k # Chai Wah Wu, Nov 04 2024
CROSSREFS
KEYWORD
nonn,tabf,easy
AUTHOR
Antti Karttunen, Feb 08 2014
STATUS
approved