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
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, 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, 1 (list; table; graph; refs; listen; history; text; internal format)
OFFSET
0,24
COMMENTS
Row sums are: {1, 2, 2, 4, 3, 6, 9, 18, 34, 58, 100, ...}.
LINKS
Indranil Ghosh, Rows 0..100, flattened
FORMULA
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.
EXAMPLE
Triangle begins as:
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, 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, 1;
...
T(6,2) = a(6) - a(2) - a(4) + 1 = 4 - 1 - 2 + 1 = 2. - Indranil Ghosh, Feb 18 2017
MATHEMATICA
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 *)
PROG
(PARI)
{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))))))};
{T(n, k) = b(n) - b(k) - b(n-k) + 1};
for(n=0, 12, for(k=0, n, print1(T(n, k), ", "))) \\ G. C. Greubel, May 07 2019
(Sage)
def b(n):
if (n==0): return 0
elif (n==1): return 1
elif (n==2): return 1
elif (n==3): return 2
elif (n==4): return 2
else: return b(n-1) +b(n-2) -b(n-3) +b(n-5)
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 07 2019
CROSSREFS
Cf. A107293.
Sequence in context: A337144 A088203 A205649 * A362951 A342464 A061342
KEYWORD
nonn,tabl,easy
AUTHOR
Roger L. Bagula, Apr 19 2010
EXTENSIONS
Edited by G. C. Greubel, May 07 2019
STATUS
approved

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 May 3 21:01 EDT 2024. Contains 372225 sequences. (Running on oeis4.)