login
This site is supported by donations 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

Indranil Ghosh, Python Program to generate the b-file

Roger L. Bagula, Three methods for computing b(n)

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: A029433 A088203 A205649 * A061342 A104639 A260704

Adjacent sequences:  A176507 A176508 A176509 * A176511 A176512 A176513

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 | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified June 16 14:56 EDT 2019. Contains 324152 sequences. (Running on oeis4.)