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.
%I A237452 #14 Nov 05 2024 12:18:39 %S A237452 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, %T A237452 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, %U A237452 2,2,2,2,2,3,3,3,3,3,3,4,4,4,4,4,4,5,5,5,5,5,5 %N A237452 Zero-based row index to irregular tables organized as successively larger square matrices. %C A237452 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). %C A237452 A237451 gives the corresponding column index. %C A237452 A238013 and A121997 give these same row and column indices, but starting the numbering with index 1. - _M. F. Hasler_, Feb 17 2014 %H A237452 Antti Karttunen, <a href="/A237452/b237452.txt">Table of squares with sizes 1x1 .. 30x30, flattened</a> %F A237452 a(n) = floor((A064866(n)-1)/A074279(n)). %F A237452 a(n) = A238013(n)-1. - _M. F. Hasler_, Feb 16 2014 %e A237452 This irregular table begins as: %e A237452 0; %e A237452 0,0; %e A237452 1,1; %e A237452 0,0,0; %e A237452 1,1,1; %e A237452 2,2,2; %e A237452 0,0,0,0; %e A237452 1,1,1,1; %e A237452 2,2,2,2; %e A237452 3,3,3,3; %e A237452 0,0,0,0,0; %e A237452 1,1,1,1,1; %e A237452 2,2,2,2,2; %e A237452 3,3,3,3,3; %e A237452 4,4,4,4,4; %e A237452 ... %o A237452 (Scheme) (define (A237452 n) (floor->exact (/ (-1+ (A064866 n)) (A074279 n)))) %o A237452 (Python) %o A237452 from sympy import integer_nthroot %o A237452 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 %Y A237452 Cf. A064866, A074279, A237451, A237265, A238013 and A121997. %K A237452 nonn,tabf %O A237452 1,12 %A A237452 _Antti Karttunen_, Feb 08 2014