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!)
A029600 Numbers in the (2,3)-Pascal triangle (by row). 28

%I #56 Nov 13 2019 01:48:57

%S 1,2,3,2,5,3,2,7,8,3,2,9,15,11,3,2,11,24,26,14,3,2,13,35,50,40,17,3,2,

%T 15,48,85,90,57,20,3,2,17,63,133,175,147,77,23,3,2,19,80,196,308,322,

%U 224,100,26,3,2,21,99,276,504,630,546,324,126,29,3,2,23,120,375,780,1134,1176,870,450,155,32,3

%N Numbers in the (2,3)-Pascal triangle (by row).

%C Reverse of A029618. - _Philippe Deléham_, Nov 21 2006

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

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

%C For n > 0: T(n,k) = A029635(n,k) + A007318(n,k), 0 <= k <= n. - _Reinhard Zumkeller_, Apr 16 2012

%C For a closed-form formula for generalized Pascal's triangle see A228576. - _Boris Putievskiy_, Sep 04 2013

%C For n>0, row sums = 5*2^(n-1). Generally, for all (a,b)-Pascal triangles, row sums are (a+b)*2^(n-1), n>0. - _Bob Selcoe_, Mar 28 2015

%H Reinhard Zumkeller, <a href="/A029600/b029600.txt">Rows n=0..150 of triangle, flattened</a>

%F T(n,k) = T(n-1,k-1) + T(n-1,k) with T(0,0)=1, T(n,0)=2, T(n,n)=3; n, k > 0. - _Boris Putievskiy_, Sep 04 2013

%F G.f.: (-1-2*x*y-x)/(-1+x*y+x). - _R. J. Mathar_, Aug 11 2015

%e First few rows are:

%e 1;

%e 2, 3;

%e 2, 5, 3;

%e 2, 7, 8, 3;

%e 2, 9, 15, 11, 3;

%e ...

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

%p if k=0 and n=0 then 1

%p elif k=0 then 2

%p elif k=n then 3

%p else T(n-1, k-1) + T(n-1, k)

%p fi

%p end:

%p seq(seq(T(n, k), k=0..n), n=0..12); # _G. C. Greubel_, Nov 12 2019

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

%o (Haskell)

%o a029600 n k = a029600_tabl !! n !! k

%o a029600_row n = a029600_tabl !! n

%o a029600_tabl = [1] : iterate

%o (\row -> zipWith (+) ([0] ++ row) (row ++ [0])) [2,3]

%o -- _Reinhard Zumkeller_, Apr 08 2012

%o (PARI) T(n,k) = if(n==0 && k==0, 1, if(k==0, 2, if(k==n, 3, T(n-1, k-1) + T(n-1, k) ))); \\ _G. C. Greubel_, Nov 12 2019

%o (Sage)

%o @CachedFunction

%o def T(n, k):

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

%o elif (k==0): return 2

%o elif (k==n): return 3

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

%o [[T(n, k) for k in (0..n)] for n in (0..12)] # _G. C. Greubel_, Nov 12 2019

%o (GAP)

%o T:= function(n,k)

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

%o elif k=0 then return 2;

%o elif k=n then return 3;

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

%o fi;

%o end;

%o Flat(List([0..12], n-> List([0..n], k-> T(n,k) ))); # _G. C. Greubel_, Nov 12 2019

%Y Cf. A007318 (Pascal's triangle), A029618, A084938, A228196, A228576.

%K nonn,tabl,easy

%O 0,2

%A _Mohammad K. Azarian_

%E More terms from _James A. Sellers_

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 April 19 07:25 EDT 2024. Contains 371782 sequences. (Running on oeis4.)