OFFSET
1,7
LINKS
Ruud H.G. van Tol, Sequence on a lattice
FORMULA
Row length L(n) = A098294(n) = floor(n*log(3)/log(2)) + 1 - n.
T(n,1) = 1.
T(n+1,k) = T(n+1,k-1) + T(n,k) for 1 < k <= L(n).
T(n+1,L(n+1)) = 0 if L(n+1) > L(n).
T(n+1,2) = n-1.
T(n+3,3) = A055998(n-1) = (n-1)*(n+4)/2.
T(n+5,4) = A111396(n-1) = (n-1)*(n+6)*(n+7)/6.
T(n+1,k) = Sum_{j=1..k} T(n,j) for 1 <= k <= L(n).
EXAMPLE
Triangle T(n,k) begins:
n|k:1| 2| 3| 4| 5| 6| 7| 8|...
--+---+---+---+---+---+---+---+---+---
1| 1
2| 1 0
3| 1 1
4| 1 2 0
5| 1 3 3
6| 1 4 7 0
7| 1 5 12 12 0
8| 1 6 18 30 30
9| 1 7 25 55 85 0
10| 1 8 33 88 173 173
11| 1 9 42 130 303 476 0
12| 1 10 52 182 485 961 961 0
...
PROG
(PARI) row(n) = my(v=Vec([1], logint(3^n, 2)+1-n), c=1); for(i=2, n, for(j=2, c, v[j]+=v[j-1]); c=logint(3^i, 2)+1-i); v
(PARI) rows(n) = my(v=vector(n, i, Vec([1], logint(3^i, 2)+1-i))); for(i=3, n, for(j=2, #v[i-1], v[i][j]=v[i][j-1]+v[i-1][j])); v
CROSSREFS
KEYWORD
nonn,tabf
AUTHOR
Ruud H.G. van Tol, Dec 28 2023
STATUS
approved