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, 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
Offset: 0
Examples
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
Links
- Indranil Ghosh, Rows 0..100, flattened
- Indranil Ghosh, Python Program to generate the b-file
Crossrefs
Cf. A003269.
Programs
-
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
-
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
-
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
-
Python
# See Indranil Ghosh link
-
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
Extensions
Name and formula sections were edited and corrected by Indranil Ghosh, Feb 17 2017
Edited by G. C. Greubel, May 06 2019
Comments