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 A056559 #20 Dec 11 2024 15:41:41 %S A056559 0,1,0,0,2,1,1,0,0,0,3,2,2,1,1,1,0,0,0,0,4,3,3,2,2,2,1,1,1,1,0,0,0,0, %T A056559 0,5,4,4,3,3,3,2,2,2,2,1,1,1,1,1,0,0,0,0,0,0,6,5,5,4,4,4,3,3,3,3,2,2, %U A056559 2,2,2,1,1,1,1,1,1,0,0,0,0,0,0,0,7,6,6,5,5,5,4,4,4,4,3,3,3,3,3,2,2,2,2,2,2 %N A056559 Tetrahedron with T(t,n,k) = t - n; succession of growing finite triangles with declining values per row. %H A056559 Peter Luschny, <a href="/A056559/b056559.txt">Table of n, a(n) for n = 0..10000</a> (first 105 terms by Henry Bottomley). %F A056559 a(n) = A056556(n) - A056557(n). %e A056559 First triangle: [0]; second triangle: [1; 0 0]; third triangle: [2; 1 1; 0 0 0]; ... %o A056559 (Julia) %o A056559 function a_list(N) %o A056559 a = Int[] %o A056559 for n in 1:N %o A056559 for j in ((k:-1:1) for k in 1:n) %o A056559 t = n - j[1] %o A056559 for m in j %o A056559 push!(a, t) %o A056559 end end end; a end %o A056559 A = a_list(10) # _Peter Luschny_, Feb 19 2020 %o A056559 (Python) %o A056559 from math import isqrt, comb %o A056559 from sympy import integer_nthroot %o A056559 def A056559(n): return (m:=integer_nthroot(6*(n+1),3)[0])-(a:=n<comb(m+2,3))-(k:=isqrt(r:=n+1-comb(m-a+2,3)<<1))+(r<<2<=(k<<2)*(k+1)+1) # _Chai Wah Wu_, Dec 11 2024 %Y A056559 Together with A056558 and A056560 might enable reading "by antidiagonals" of cube arrays as 3-dimensional analog of A002262 and A025581 with square arrays. %Y A056559 Bisection (y-coordinates) of A332662. %K A056559 nonn,look %O A056559 0,5 %A A056559 _Henry Bottomley_, Jun 26 2000