cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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

This page as a plain text file.
%I A176508 #20 Sep 08 2022 08:45:52
%S A176508 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 A176508 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 A176508 Triangle, read by rows, defined by T(n, k) = b(n) - b(k) - b(n-k) + 1, b(n) = A003269(n).
%C A176508 Row sums are: {1, 2, 2, 2, 2, 6, 10, 14, 18, 30, 51,...}.
%H A176508 Indranil Ghosh, <a href="/A176508/b176508.txt">Rows 0..100, flattened</a>
%H A176508 Indranil Ghosh, <a href="/A176508/a176508.txt">Python Program to generate the b-file</a>
%F A176508 T(n,m) = A003269(n) - A003269(m) - A003269(n-m) + 1.
%e A176508 Triangle:
%e A176508   1;
%e A176508   1, 1;
%e A176508   1, 0, 1;
%e A176508   1, 0, 0, 1;
%e A176508   1, 0, 0, 0, 1;
%e A176508   1, 1, 1, 1, 1, 1;
%e A176508   1, 1, 2, 2, 2, 1, 1;
%e A176508   1, 1, 2, 3, 3, 2, 1, 1;
%e A176508   1, 1, 2, 3, 4, 3, 2, 1, 1;
%e A176508   1, 2, 3, 4, 5, 5, 4, 3, 2, 1;
%e A176508   1, 3, 5, 6, 7, 7, 7, 6, 5, 3, 1;
%e A176508 ...
%e A176508 T(6,3) = A003269(6) - A003269(3) - A003269(6-3) + 1 = 3 - 1 - 1 + 1 = 2. - _Indranil Ghosh_, Feb 17 2017
%t A176508 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 A176508 (Python) # See Indranil Ghosh link
%o A176508 (PARI)
%o A176508 {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 A176508 {T(n, k) = b(n) -b(k) -b(n-k) +1}; \\ _G. C. Greubel_, May 06 2019
%o A176508 (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 A176508 (Sage)
%o A176508 def b(n):
%o A176508     if (n==0): return 0
%o A176508     elif (n==1): return 1
%o A176508     elif (n==2): return 1
%o A176508     elif (n==3): return 1
%o A176508     else: return b(n-1) + b(n-4)
%o A176508 def T(n, k): return b(n) - b(k) - b(n-k) + 1
%o A176508 [[T(n, k) for k in (0..n)] for n in (0..12)] # _G. C. Greubel_, May 06 2019
%Y A176508 Cf. A003269.
%K A176508 nonn,easy,tabl
%O A176508 0,24
%A A176508 _Roger L. Bagula_, Apr 19 2010
%E A176508 Name and formula sections were edited and corrected by _Indranil Ghosh_, Feb 17 2017
%E A176508 Edited by _G. C. Greubel_, May 06 2019