cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A237452 Zero-based row index to irregular tables organized as successively larger square matrices.

Original entry on oeis.org

0, 0, 0, 1, 1, 0, 0, 0, 1, 1, 1, 2, 2, 2, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5
Offset: 1

Views

Author

Antti Karttunen, Feb 08 2014

Keywords

Comments

With sequences constructed of successively larger kxk square matrices (cf. A074279), a(n) will return the distance of n from the top edge of the matrix that n is located in, with 0 standing for the topmost row in that matrix (please see the Example section).
A237451 gives the corresponding column index.
A238013 and A121997 give these same row and column indices, but starting the numbering with index 1. - M. F. Hasler, Feb 17 2014

Examples

			This irregular table begins as:
0;
0,0;
1,1;
0,0,0;
1,1,1;
2,2,2;
0,0,0,0;
1,1,1,1;
2,2,2,2;
3,3,3,3;
0,0,0,0,0;
1,1,1,1,1;
2,2,2,2,2;
3,3,3,3,3;
4,4,4,4,4;
...
		

Crossrefs

Programs

  • Python
    from sympy import integer_nthroot
    def A237452(n): return (n-1-(k:=(m:=integer_nthroot(3*n,3)[0])+(6*n>m*(m+1)*((m<<1)+1)))*(k-1)*((k<<1)-1)//6)//k # Chai Wah Wu, Nov 04 2024
  • Scheme
    (define (A237452 n) (floor->exact (/ (-1+ (A064866 n)) (A074279 n))))
    

Formula

a(n) = floor((A064866(n)-1)/A074279(n)).
a(n) = A238013(n)-1. - M. F. Hasler, Feb 16 2014