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 A333516 #54 Nov 10 2024 15:59:09 %S A333516 1,1,1,2,1,1,2,1,2,3,1,1,2,1,2,3,1,2,3,4,1,1,2,1,2,3,1,2,3,4,1,2,3,4, %T A333516 5,1,1,2,1,2,3,1,2,3,4,1,2,3,4,5,1,2,3,4,5,6,1,1,2,1,2,3,1,2,3,4,1,2, %U A333516 3,4,5,1,2,3,4,5,6,1,2,3,4,5,6,7,1,1,2,1,2,3,1,2,3,4,1,2,3,4,5,1,2,3,4,5,6 %N A333516 Irregular triangle read by rows in which row n lists the first A000217(n) terms of A002260, n >= 1. %C A333516 a(n) equals the difference between n and the largest number less than n that can be expressed as the sum of the i-th triangular number and the j-th tetrahedral number for integers i < j. %F A333516 a(n) = A002260(A124171(n)). %e A333516 Triangle begins: %e A333516 1; %e A333516 1, 1, 2; %e A333516 1, 1, 2, 1, 2, 3; %e A333516 1, 1, 2, 1, 2, 3, 1, 2, 3, 4; %e A333516 1, 1, 2, 1, 2, 3, 1, 2, 3, 4, 1, 2, 3, 4, 5; %e A333516 1, 1, 2, 1, 2, 3, 1, 2, 3, 4, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 6; %e A333516 1, 1, 2, 1, 2, 3, 1, 2, 3, 4, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 6, 1, 2, 3, 4, 5, 6, 7; %e A333516 ... %p A333516 T:= n-> seq([$1..i][], i=1..n): %p A333516 seq(T(n), n=1..7); # _Alois P. Heinz_, Apr 10 2020 %o A333516 (Python) %o A333516 from math import comb, isqrt %o A333516 from sympy import integer_nthroot %o A333516 def A333516(n): return (r:=n-1-comb((m:=integer_nthroot(6*n,3)[0])+(n>comb(m+2,3))+1,3))-comb((k:=isqrt(m:=r+1<<1))+(m>k*(k+1)),2)+1 # _Chai Wah Wu_, Nov 10 2024 %Y A333516 Row sums give A000292. %Y A333516 Right border gives A000027. %Y A333516 Cf. A000217, A002260, A124171. %K A333516 nonn,easy,tabf %O A333516 1,4 %A A333516 _Andrew Slattery_, Mar 25 2020