A237451 Zero-based column index to irregular tables organized as successively larger square matrices.
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
Examples
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;...
Links
- Antti Karttunen, Table of squares with sizes 1x1 .. 30x30, flattened
Programs
-
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
-
Scheme
(define (A237451 n) (modulo (-1+ (A064866 n)) (A074279 n)))
Formula
a(n) = A121997(n)-1. - M. F. Hasler, Feb 16 2014
Comments