login
A146988
Triangle, read by rows, T(n, k) = binomial(n, k) for n < 2 and binomial(n, k) + 4^(n-1) * binomial(n-2, k-1) otherwise.
1
1, 1, 1, 1, 6, 1, 1, 19, 19, 1, 1, 68, 134, 68, 1, 1, 261, 778, 778, 261, 1, 1, 1030, 4111, 6164, 4111, 1030, 1, 1, 4103, 20501, 40995, 40995, 20501, 4103, 1, 1, 16392, 98332, 245816, 327750, 245816, 98332, 16392, 1, 1, 65545, 458788, 1376340, 2293886, 2293886, 1376340, 458788, 65545, 1
OFFSET
0,5
COMMENTS
Row sums are {1, 2, 8, 40, 272, 2080, 16448, 131200, 1048832, 8389120, 67109888, ...} = {1, 2, 8*A081342(n)}. (modified by G. C. Greubel, Jan 09 2020)
FORMULA
T(n, k) = binomial(n, k) for n < 2 and binomial(n, k) + 2^(n-1) * binomial(n-2, k-1) otherwise.
Sum_{k=0..n} T(n,k) = n+1 for n < 2 and 4*(2^n + 8^n) otherwise. - G. C. Greubel, Jan 09 2020
EXAMPLE
Triangle begins as:
1;
1, 1;
1, 6, 1;
1, 19, 19, 1;
1, 68, 134, 68, 1;
1, 261, 778, 778, 261, 1;
1, 1030, 4111, 6164, 4111, 1030, 1;
MAPLE
q:=4; seq(seq( `if`(n<2, binomial(n, k), binomial(n, k) + q^(n-1)*binomial(n-2, k-1)), k=0..n), n=0..10); # G. C. Greubel, Jan 09 2020
MATHEMATICA
Table[If[n<2, Binomial[n, m], Binomial[n, m] + 4^(n-1)*Binomial[n-2, m-1]], {n, 0, 10}, {m, 0, n}]//Flatten
PROG
(PARI) T(n, k) = if(n<2, binomial(n, k), binomial(n, k) + 4^(n-1)*binomial(n-2, k-1) ); \\ G. C. Greubel, Jan 09 2020
(Magma) T:= func< n, k, q | n lt 2 select Binomial(n, k) else Binomial(n, k) + q^(n-1)*Binomial(n-2, k-1) >;
[T(n, k, 4): k in [0..n], n in [0..10]]; // G. C. Greubel, Jan 09 2020
(Sage)
@CachedFunction
def T(n, k, q):
if (n<2): return binomial(n, k)
else: return binomial(n, k) + q^(n-1)*binomial(n-2, k-1)
[[T(n, k, 4) for k in (0..n)] for n in (0..10)] # G. C. Greubel, Jan 09 2020
(GAP)
T:= function(n, k, q)
if n<2 then return Binomial(n, k);
else return Binomial(n, k) + q^(n-1)*Binomial(n-2, k-1);
fi; end;
Flat(List([0..10], n-> List([0..n], k-> T(n, k, 4) ))); # G. C. Greubel, Jan 09 2020
CROSSREFS
Sequence in context: A141690 A318408 A146957 * A203954 A060972 A144066
KEYWORD
nonn,tabl
AUTHOR
Roger L. Bagula, Nov 04 2008
EXTENSIONS
Edited by G. C. Greubel, Jan 09 2020
STATUS
approved