OFFSET
0,2
COMMENTS
Row sums = 3^n.
Left column = A007051: (1, 2, 5, 14, 41, 122, ...).
LINKS
G. C. Greubel, Rows n = 0..100 of triangle, flattened
FORMULA
Binomial transform of A193554, as infinite lower triangular matrices.
T(n,k) = Sum_{j=0..n-k} (-1)^(n-k+j)*binomial(n,j)*2^j, with T(n,n) = 1, and T(n,0) = (3^n + 1)/2. - G. C. Greubel, Nov 20 2019
EXAMPLE
First few rows of the triangle:
1;
2, 1;
5, 3, 1;
14, 7, 5, 1;
41, 15, 17, 7, 1;
...
MAPLE
T:= proc(n, k) option remember;
if k=n then 1
elif k=0 then (3^n_1)/2
else add((-1)^(n-k+j)*binomial(n, j)*2^j, j=0..n-k)
fi; end:
seq(seq(T(n, k), k=0..n), n=0..12); # G. C. Greubel, Nov 20 2019
MATHEMATICA
T[n_, k_]:= T[n, k]= If[k==n, 1, If[k==0, (3^n+1)/2, Sum [(-1)^(n-k+i)* Binomial[n, i]*2^i, {i, 0, n-k}]]]; Table[T[n, k], {n, 0, 12}, {k, 0, n}]//Flatten (* G. C. Greubel, Nov 20 2019 *)
PROG
(PARI) T(n, k) = if(k==n, 1, if(k==0, (3^n+1)/2, sum(j=0, n-k, (-1)^(n-k+j)*binomial(n, j)*2^j) )); \\ G. C. Greubel, Nov 20 2019
(Magma)
function T(n, k)
if k eq n then return 1;
elif k eq 0 then return (3^n+1)/2;
else return (&+[(-1)^(n-k+j)*2^j*Binomial(n, j): j in [0..n-k]]);
end if; return T; end function;
[T(n, k): k in [0..n], n in [0..12]]; // G. C. Greubel, Nov 20 2019
(Sage)
@CachedFunction
def T(n, k):
if (k==n): return 1
elif (k==0): return (3^n+1)/2
else: return sum((-1)^(n-k+j)*2^j*binomial(n, j) for j in (0..n-k))
[[T(n, k) for k in (0..n)] for n in (0..12)] # G. C. Greubel, Nov 20 2019
CROSSREFS
KEYWORD
nonn,tabl
AUTHOR
Gary W. Adamson, Nov 23 2007
EXTENSIONS
Definition corrected by N. J. A. Sloane, Jul 30 2011
STATUS
approved