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 A121997 #25 Nov 05 2024 12:17:58 %S A121997 1,1,2,1,2,1,2,3,1,2,3,1,2,3,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4, %T A121997 5,1,2,3,4,5,1,2,3,4,5,1,2,3,4,5,1,2,3,4,5,1,2,3,4,5,6,1,2,3,4,5,6,1, %U A121997 2,3,4,5,6,1,2,3,4,5,6,1,2,3,4,5,6,1,2,3,4,5,6,1,2,3,4,5,6,7,1,2,3,4,5,6,7 %N A121997 Count up to n, n times. %C A121997 The n-th block consists of n subblocks, each of which counts from 1 to n. %C A121997 This a fractal sequence: removing the first instance of each value leaves the original sequence. %C A121997 The first comment implies that this gives the column index of the n-th element of a sequence whose terms are coefficients, read by rows, of a sequence of matrices of size 1 X 1, 2 X 2, 3 X 3, etc.; cf. example. The row index is given by A238013(n), and the size of the matrix by A074279(n). - _M. F. Hasler_, Feb 16 2014 %e A121997 Sequence begins: %e A121997 1; %e A121997 1,2; %e A121997 1,2; %e A121997 1,2,3; %e A121997 1,2,3; %e A121997 1,2,3; %e A121997 ... %e A121997 The blocks of n subblocks of n terms (n=1,2,3,...) can be cast into a square matrices of order n; then the terms are equal to the index of the column they fall into. %o A121997 (PARI) A121997(N=9)=concat(vector(N,i,concat(vector(i,j,vector(i,k,k))))) \\ Note: this creates a vector; use A121997()[n] to get the n-th term. - _M. F. Hasler_, Feb 16 2014 %o A121997 (Python) %o A121997 from sympy import integer_nthroot %o A121997 def A121997(n): return 1+(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 %Y A121997 Cf. A081489 (locations of new values), A075349 (locations of 1's). %Y A121997 Cf. A000290 (row lengths), A002411 (row sums), A036740 (row products). %Y A121997 Cf. A002024 and references there, esp. in PROG section. %Y A121997 Cf. A238013. %K A121997 easy,nonn,tabf %O A121997 1,3 %A A121997 _Franklin T. Adams-Watters_, Sep 11 2006