[go: up one dir, main page]

login
A029600
Numbers in the (2,3)-Pascal triangle (by row).
28
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, 15, 48, 85, 90, 57, 20, 3, 2, 17, 63, 133, 175, 147, 77, 23, 3, 2, 19, 80, 196, 308, 322, 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
OFFSET
0,2
COMMENTS
Reverse of A029618. - Philippe Deléham, Nov 21 2006
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
Row n: expansion of (2+3x)*(1+x)^(n-1), n>0. - Philippe Deléham, Oct 10 2011.
For n > 0: T(n,k) = A029635(n,k) + A007318(n,k), 0 <= k <= n. - Reinhard Zumkeller, Apr 16 2012
For a closed-form formula for generalized Pascal's triangle see A228576. - Boris Putievskiy, Sep 04 2013
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
LINKS
FORMULA
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
G.f.: (-1-2*x*y-x)/(-1+x*y+x). - R. J. Mathar, Aug 11 2015
EXAMPLE
First few rows are:
1;
2, 3;
2, 5, 3;
2, 7, 8, 3;
2, 9, 15, 11, 3;
...
MAPLE
T:= proc(n, k) option remember;
if k=0 and n=0 then 1
elif k=0 then 2
elif k=n then 3
else T(n-1, k-1) + T(n-1, k)
fi
end:
seq(seq(T(n, k), k=0..n), n=0..12); # G. C. Greubel, Nov 12 2019
MATHEMATICA
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 *)
PROG
(Haskell)
a029600 n k = a029600_tabl !! n !! k
a029600_row n = a029600_tabl !! n
a029600_tabl = [1] : iterate
(\row -> zipWith (+) ([0] ++ row) (row ++ [0])) [2, 3]
-- Reinhard Zumkeller, Apr 08 2012
(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
(Sage)
@CachedFunction
def T(n, k):
if (n==0 and k==0): return 1
elif (k==0): return 2
elif (k==n): return 3
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 2;
elif k=n then return 3;
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 (Pascal's triangle), A029618, A084938, A228196, A228576.
Sequence in context: A049805 A104887 A064886 * A169616 A344448 A111076
KEYWORD
nonn,tabl,easy
EXTENSIONS
More terms from James A. Sellers
STATUS
approved