login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A176508 Triangle, read by rows, defined by T(n, k) = b(n) - b(k) - b(n-k) + 1, b(n) = A003269(n). 1

%I #20 Sep 08 2022 08:45:52

%S 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,

%T 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

%N Triangle, read by rows, defined by T(n, k) = b(n) - b(k) - b(n-k) + 1, b(n) = A003269(n).

%C Row sums are: {1, 2, 2, 2, 2, 6, 10, 14, 18, 30, 51,...}.

%H Indranil Ghosh, <a href="/A176508/b176508.txt">Rows 0..100, flattened</a>

%H Indranil Ghosh, <a href="/A176508/a176508.txt">Python Program to generate the b-file</a>

%F T(n,m) = A003269(n) - A003269(m) - A003269(n-m) + 1.

%e Triangle:

%e 1;

%e 1, 1;

%e 1, 0, 1;

%e 1, 0, 0, 1;

%e 1, 0, 0, 0, 1;

%e 1, 1, 1, 1, 1, 1;

%e 1, 1, 2, 2, 2, 1, 1;

%e 1, 1, 2, 3, 3, 2, 1, 1;

%e 1, 1, 2, 3, 4, 3, 2, 1, 1;

%e 1, 2, 3, 4, 5, 5, 4, 3, 2, 1;

%e 1, 3, 5, 6, 7, 7, 7, 6, 5, 3, 1;

%e ...

%e T(6,3) = A003269(6) - A003269(3) - A003269(6-3) + 1 = 3 - 1 - 1 + 1 = 2. - _Indranil Ghosh_, Feb 17 2017

%t 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

%o (Python) # See Indranil Ghosh link

%o (PARI)

%o {b(n) = if(n==0, 0, if(n==1, 1, if(n==2, 1, if(n==3, 1, b(n-1) +b(n-4)))) )};

%o {T(n, k) = b(n) -b(k) -b(n-k) +1}; \\ _G. C. Greubel_, May 06 2019

%o (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

%o (Sage)

%o def b(n):

%o if (n==0): return 0

%o elif (n==1): return 1

%o elif (n==2): return 1

%o elif (n==3): return 1

%o else: return b(n-1) + b(n-4)

%o def T(n, k): return b(n) - b(k) - b(n-k) + 1

%o [[T(n, k) for k in (0..n)] for n in (0..12)] # _G. C. Greubel_, May 06 2019

%Y Cf. A003269.

%K nonn,easy,tabl

%O 0,24

%A _Roger L. Bagula_, Apr 19 2010

%E Name and formula sections were edited and corrected by _Indranil Ghosh_, Feb 17 2017

%E Edited by _G. C. Greubel_, May 06 2019

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified March 28 10:55 EDT 2024. Contains 371241 sequences. (Running on oeis4.)