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!)
A176510 Triangle, read by rows, defined by T(n, m) = b(n) - b(m) - b(n-m) + 1, where b(n) = b(n-1) + b(n-2) - b(n-3) + b(n-5), with b(0) = 0, b(1) = 1, b(2) = 1, b(3) = 2, b(4) = 2. 1

%I #15 May 07 2019 23:12:38

%S 1,1,1,1,0,1,1,1,1,1,1,0,1,0,1,1,1,1,1,1,1,1,1,2,1,2,1,1,1,2,3,3,3,3,

%T 2,1,1,3,5,5,6,5,5,3,1,1,4,7,8,9,9,8,7,4,1,1,6,10,12,14,14,14,12,10,6,

%U 1

%N Triangle, read by rows, defined by T(n, m) = b(n) - b(m) - b(n-m) + 1, where b(n) = b(n-1) + b(n-2) - b(n-3) + b(n-5), with b(0) = 0, b(1) = 1, b(2) = 1, b(3) = 2, b(4) = 2.

%C Row sums are: {1, 2, 2, 4, 3, 6, 9, 18, 34, 58, 100, ...}.

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

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

%H Roger L. Bagula, <a href="/A176510/a176510_1.txt">Three methods for computing b(n)</a>

%F Let b(n) = b(n-1) + b(n-2) - b(n-3) + b(n-5), with b(0) = 0, b(1) = 1, b(2) = 1, b(3) = 2, b(4) = 2 then the triangle is defined as T(n, m) = b(n) - b(m) - b(n-m) + 1.

%e Triangle begins as:

%e 1;

%e 1, 1;

%e 1, 0, 1;

%e 1, 1, 1, 1;

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

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

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

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

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

%e 1, 4, 7, 8, 9, 9, 8, 7, 4, 1;

%e 1, 6, 10, 12, 14, 14, 14, 12, 10, 6, 1;

%e ...

%e T(6,2) = a(6) - a(2) - a(4) + 1 = 4 - 1 - 2 + 1 = 2. - _Indranil Ghosh_, Feb 18 2017

%t b[0]:=0; b[1]:=1; b[2]:=1; b[3]:=2; b[4]=2; b[n_]:= b[n-1] +b[n-2] -b[n-3] +b[n-5]; T[n_, m_]:= b[n] -b[m] -b[n-m] +1; Table[T[n, m], {n,0, 12}, {m,0,n}]//Flatten (* modified by _G. C. Greubel_, May 07 2019 *)

%o (PARI)

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

%o {T(n,k) = b(n) - b(k) - b(n-k) + 1};

%o for(n=0,12, for(k=0,n, print1(T(n,k), ", "))) \\ _G. C. Greubel_, May 07 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 2

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

%o else: return b(n-1) +b(n-2) -b(n-3) +b(n-5)

%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 07 2019

%Y Cf. A107293.

%K nonn,tabl,easy

%O 0,24

%A _Roger L. Bagula_, Apr 19 2010

%E Edited by _G. C. Greubel_, May 07 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 April 19 12:14 EDT 2024. Contains 371792 sequences. (Running on oeis4.)