|
|
A176508
|
|
Triangle, read by rows, defined by T(n, k) = b(n) - b(k) - b(n-k) + 1, b(n) = A003269(n).
|
|
1
|
|
|
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
(list;
table;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,24
|
|
COMMENTS
|
Row sums are: {1, 2, 2, 2, 2, 6, 10, 14, 18, 30, 51,...}.
|
|
LINKS
|
|
|
FORMULA
|
|
|
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;
...
|
|
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)))) )};
(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
|
|
|
EXTENSIONS
|
Name and formula sections were edited and corrected by Indranil Ghosh, Feb 17 2017
|
|
STATUS
|
approved
|
|
|
|