OFFSET
0,24
COMMENTS
Row sums are: {1, 2, 2, 2, 2, 6, 10, 14, 18, 30, 51,...}.
LINKS
Indranil Ghosh, Rows 0..100, flattened
Indranil Ghosh, Python Program to generate the b-file
EXAMPLE
Triangle:
1;
1, 1;
1, 0, 1;
1, 0, 0, 1;
1, 0, 0, 0, 1;
1, 1, 1, 1, 1, 1;
1, 1, 2, 2, 2, 1, 1;
1, 1, 2, 3, 3, 2, 1, 1;
1, 1, 2, 3, 4, 3, 2, 1, 1;
1, 2, 3, 4, 5, 5, 4, 3, 2, 1;
1, 3, 5, 6, 7, 7, 7, 6, 5, 3, 1;
...
T(6,3) = A003269(6) - A003269(3) - A003269(6-3) + 1 = 3 - 1 - 1 + 1 = 2. - Indranil Ghosh, Feb 17 2017
MATHEMATICA
b[0]:= 0; b[1]:= 1; b[2]:= 1; b[3]:= 1; b[n_]:= b[n] = b[n-1] + b[n-4]; T[n_, m_]:= b[n] - b[m] - b[n-m] + 1; Table[T[n, m], {n, 0, 10}, {m, 0, n} ]//Flatten
PROG
(Python) # See Indranil Ghosh link
(PARI)
{b(n) = if(n==0, 0, if(n==1, 1, if(n==2, 1, if(n==3, 1, b(n-1) +b(n-4)))) )};
{T(n, k) = b(n) -b(k) -b(n-k) +1}; \\ G. C. Greubel, May 06 2019
(Magma) b:= func< n | n eq 0 select 0 else (&+[Binomial(n-1-3*j, j): j in [0..Floor((n-1)/3)]]) >; [[b(n)-b(k)-b(n-k)+1: k in [0..n]]: n in [0..10]]; // G. C. Greubel, May 06 2019
(Sage)
def b(n):
if (n==0): return 0
elif (n==1): return 1
elif (n==2): return 1
elif (n==3): return 1
else: return b(n-1) + b(n-4)
def T(n, k): return b(n) - b(k) - b(n-k) + 1
[[T(n, k) for k in (0..n)] for n in (0..12)] # G. C. Greubel, May 06 2019
CROSSREFS
KEYWORD
AUTHOR
Roger L. Bagula, Apr 19 2010
EXTENSIONS
Name and formula sections were edited and corrected by Indranil Ghosh, Feb 17 2017
Edited by G. C. Greubel, May 06 2019
STATUS
approved