login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A027052 Triangular array T read by rows: T(n,0) = T(n,2n) = 1 for n >= 0, T(n,1)=0 for n >= 1, T(n,2)=1 for n >= 2 and for n >= 3, T(n,k) = T(n-1,k-3) + T(n-1, k-2) + T(n-1,k-1) for 3 <= k <= 2n-1. T(n,k)=0 for k < 0 or k > 2n. 40
1, 1, 0, 1, 1, 0, 1, 2, 1, 1, 0, 1, 2, 3, 4, 1, 1, 0, 1, 2, 3, 6, 9, 8, 1, 1, 0, 1, 2, 3, 6, 11, 18, 23, 18, 1, 1, 0, 1, 2, 3, 6, 11, 20, 35, 52, 59, 42, 1, 1, 0, 1, 2, 3, 6, 11, 20, 37, 66, 107, 146, 153, 102, 1, 1, 0, 1, 2, 3, 6, 11, 20, 37, 68, 123, 210, 319, 406, 401, 256, 1 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,8

COMMENTS

The following sequences all have the same parity: A004737, A006590, A027052, A071028, A071797, A078358, A078446. - Jeremy Gardiner, Mar 16 2003

LINKS

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

FORMULA

A001590(k+1) = T(n,k) if 0 <= k <= n. - Michael Somos, Jun 01 2014

EXAMPLE

Triangle T(n,k) for 0 <= k <= 2n:

  1;

  1, 0, 1;

  1, 0, 1, 2, 1;

  1, 0, 1, 2, 3, 4, 1;

  1, 0, 1, 2, 3, 6, 9, 8, 1;

MAPLE

T:= proc(n, k) option remember;

      if k=0 or k=2 or k=2*n then 1

    elif k=1 then 0

    else add(T(n-1, k-j), j=1..3)

      fi

    end:

seq(seq(T(n, k), k=0..2*n), n=0..10); # G. C. Greubel, Nov 05 2019

MATHEMATICA

T[n_, k_]:= T[n, k]= If[k==0 || k==2 || k==2*n, 1, If[k==1, 0, Sum[T[n-1, k-j], {j, 3}]]]; Table[T[n, k], {n, 0, 12}, {k, 0, 2*n}]//Flatten (* G. C. Greubel, Nov 05 2019 *)

PROG

(PARI) {T(n, k) = if(k==0 || k==2 || k==2*n, 1, if(k==1, 0, sum(j=1, 3, T(n-1, k-j)) ))};

for(n=0, 10, for(k=0, 2*n, print1(T(n, k), ", "))) \\ G. C. Greubel, Nov 05 2019

(Sage)

@CachedFunction

def T(n, k):

    if (k==0 or k==2 or k==2*n): return 1

    elif (k==1): return 0

    else: return sum(T(n-1, k-j) for j in (1..3))

[[T(n, k) for k in (0..2*n)] for n in (0..10)] # G. C. Greubel, Nov 05 2019

(GAP)

T:= function(n, k)

    if k=0 or k=2 or k=2*n then return 1;

    elif k=1 then return 0;

    else return Sum([1..3], j-> T(n-1, k-j) );

    fi;

  end;

Flat(List([0..10], n-> List([0..2*n], k-> T(n, k) ))); # G. C. Greubel, Nov 05 2019

CROSSREFS

Cf. A001590, a tribonacci sequence.

Cf. A160999 (row sums), A005408 (row lengths).

Diagonals T(n, n+c): A027053 (c=2), A027054 (c=3), A027055 (c=4).

Diagonals T(n, 2n-c): A027056 (c=1), A027058 (c=2), A027059 (c=3), A027060 (c=4), A027061(c=5), A027062 (c=6), A027063 (c=7), A027064 (c=8), A027065 (c=9), A027066 (c=10).

Sums involving this array: A027067, A027068, A027069, A027070, A027072, A027073, A027074, A027075, A027076, A027077,A027078, A027079, A027080, A027081.

Other related sequences: A027057, A027071.

Other arrays of this type: A027023, A027082, A027113.

Sequence in context: A153764 A294509 A059571 * A322508 A194438 A144409

Adjacent sequences:  A027049 A027050 A027051 * A027053 A027054 A027055

KEYWORD

nonn,tabf

AUTHOR

Clark Kimberling

EXTENSIONS

Offset and keyword:tabl corrected by R. J. Mathar, Jun 01 2009

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 July 16 09:05 EDT 2020. Contains 335781 sequences. (Running on oeis4.)