|
|
|
|
1, 2, 1, 5, 3, 1, 14, 7, 5, 1, 41, 15, 17, 7, 1, 122, 31, 49, 31, 9, 1, 365, 63, 129, 111, 49, 11, 1, 1094, 127, 321, 351, 209, 71, 13, 1, 3281, 255, 769, 1023, 769, 351, 97, 15, 1, 9842, 511, 1793, 2815, 2561, 1471, 545, 127, 17, 1
(list;
table;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,2
|
|
COMMENTS
|
Row sums = 3^n.
Left column = A007051: (1, 2, 5, 14, 41, 122, ...).
|
|
LINKS
|
|
|
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:
|
|
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
|
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|