login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A029618 Numbers in (3,2)-Pascal triangle (by row). 24
1, 3, 2, 3, 5, 2, 3, 8, 7, 2, 3, 11, 15, 9, 2, 3, 14, 26, 24, 11, 2, 3, 17, 40, 50, 35, 13, 2, 3, 20, 57, 90, 85, 48, 15, 2, 3, 23, 77, 147, 175, 133, 63, 17, 2, 3, 26, 100, 224, 322, 308, 196, 80, 19, 2, 3, 29, 126, 324, 546, 630, 504, 276, 99, 21, 2, 3, 32, 155, 450, 870 (list; table; graph; refs; listen; history; text; internal format)
OFFSET

0,2

COMMENTS

Reverse of A029600. - Philippe Deléham, Nov 21 2006

Triangle T(n,k), read by rows, given by (3,-2,0,0,0,0,0,0,0,...) DELTA (2,-1,0,0,0,0,0,0,0,...) where DELTA is the operator defined in A084938. - Philippe Deléham, Oct 10 2011

Row n: expansion of (3+2x)*(1+x)^(n-1), n>0. - Philippe Deléham, Oct 10 2011

For a closed-form formula for generalized Pascal's triangle see A228576. - Boris Putievskiy, Sep 04 2013

LINKS

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

FORMULA

T(n,k) = T(n-1,k-1) + T(n-1,k) with T(0,0)=1, T(n,0)=3, T(n,n)=2; n, k > 0. - Boris Putievskiy, Sep 04 2013

G.f.: (-1-x*y-2*x)/(-1+x*y+x). - R. J. Mathar, Aug 11 2015

EXAMPLE

Triangle begins as:

  1;

  3,  2;

  3,  5,  2;

  3,  8,  7,  2;

  3, 11, 15,  9,  2;

  ...

MAPLE

A029618 := proc(n, k)

    if k < 0 or k > n then

        0;

    elif  n = 0 then

        1;

    elif k=0 then

        3;

    elif k = n then

        2;

    else

        procname(n-1, k-1)+procname(n-1, k) ;

    end if;

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

MATHEMATICA

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

PROG

(PARI) T(n, k) = if(n==0 && k==0, 1, if(k==0, 3, if(k==n, 2, T(n-1, k-1) + T(n-1, k) ))); \\ G. C. Greubel, Nov 12 2019

(Sage)

@CachedFunction

def T(n, k):

    if (n==0 and k==0): return 1

    elif (k==0): return 3

    elif (k==n): return 2

    else: return T(n-1, k-1) + T(n-1, k)

[[T(n, k) for k in (0..n)] for n in (0..12)] # G. C. Greubel, Nov 12 2019

(GAP)

T:= function(n, k)

    if n=0 and k=0 then return 1;

    elif k=0 then return 3;

    elif k=n then return 2;

    else return T(n-1, k-1) + T(n-1, k);

    fi;

  end;

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

CROSSREFS

Cf. A007318, A029600, A084938, A228196, A228576, A016789 (2nd column), A005449 (3rd column), A006002 (4th column).

Sequence in context: A236361 A227634 A064885 * A264399 A240225 A283893

Adjacent sequences:  A029615 A029616 A029617 * A029619 A029620 A029621

KEYWORD

nonn,easy,tabl,changed

AUTHOR

Mohammad K. Azarian

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 November 13 12:45 EST 2019. Contains 329094 sequences. (Running on oeis4.)