login
A056559
Tetrahedron with T(t,n,k) = t - n; succession of growing finite triangles with declining values per row.
10
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, 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, 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
OFFSET
0,5
LINKS
Peter Luschny, Table of n, a(n) for n = 0..10000 (first 105 terms by Henry Bottomley).
FORMULA
a(n) = A056556(n) - A056557(n).
EXAMPLE
First triangle: [0]; second triangle: [1; 0 0]; third triangle: [2; 1 1; 0 0 0]; ...
PROG
(Julia)
function a_list(N)
a = Int[]
for n in 1:N
for j in ((k:-1:1) for k in 1:n)
t = n - j[1]
for m in j
push!(a, t)
end end end; a end
A = a_list(10) # Peter Luschny, Feb 19 2020
(Python)
from math import isqrt, comb
from sympy import integer_nthroot
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
CROSSREFS
Together with A056558 and A056560 might enable reading "by antidiagonals" of cube arrays as 3-dimensional analog of A002262 and A025581 with square arrays.
Bisection (y-coordinates) of A332662.
Sequence in context: A361509 A143809 A385240 * A117200 A107015 A015374
KEYWORD
nonn,look
AUTHOR
Henry Bottomley, Jun 26 2000
STATUS
approved