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!)
A158821 Triangle read by rows: row n (n>=0) ends with 1, and for n>=1 begins with n; other entries are zero. 8
1, 1, 1, 2, 0, 1, 3, 0, 0, 1, 4, 0, 0, 0, 1, 5, 0, 0, 0, 0, 1, 6, 0, 0, 0, 0, 0, 1, 7, 0, 0, 0, 0, 0, 0, 1, 8, 0, 0, 0, 0, 0, 0, 0, 1, 9, 0, 0, 0, 0, 0, 0, 0, 0, 1, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 13, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1 (list; table; graph; refs; listen; history; text; internal format)
OFFSET

0,4

LINKS

G. C. Greubel, Rows n = 0..50 of the triangle, flattened

FORMULA

T(n, k) = A145677(n, n-k-1). - R. J. Mathar, Apr 01 2009

From G. C. Greubel, Dec 22 2021: (Start)

Sum_{k=0..n} T(n, k) = A000027(n).

Sum_{k=0..floor(n/2)} T(n-k, k) = A109613(n). (End)

EXAMPLE

Triangle begins:

  1;

  1, 1;

  2, 0, 1;

  3, 0, 0, 1;

  4, 0, 0, 0, 1;

  5, 0, 0, 0, 0, 1;

  6, 0, 0, 0, 0, 0, 1;

  7, 0, 0, 0, 0, 0, 0, 1;

MAPLE

A158821:= proc(n, k)

    if n = k then 1;

    elif k = 0 then n;

    else 0;

    end if;

end proc: # R. J. Mathar, Jan 08 2015

MATHEMATICA

T[n_, k_]:= If[k==0, Boole[n==0] +n, If[k==n, 1, 0]];

Table[T[n, k], {n, 0, 12}, {k, 0, n}]//Flatten (* G. C. Greubel, Dec 22 2021 *)

PROG

(Sage)

def A158821(n, k):

    if (k==0): return n + bool(n==0)

    elif (k==n): return 1

    else: return 0

flatten([[A158821(n, k) for k in (0..n)] for n in (0..12)]) # G. C. Greubel, Dec 22 2021

CROSSREFS

Cf. A000027, A109613, A145677.

Sequence in context: A309576 A128132 A127701 * A004199 A062283 A136493

Adjacent sequences:  A158818 A158819 A158820 * A158822 A158823 A158824

KEYWORD

nonn,tabl,easy

AUTHOR

Gary W. Adamson, Mar 30 2008

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 June 30 13:18 EDT 2022. Contains 354939 sequences. (Running on oeis4.)