OFFSET
0,5
COMMENTS
Row sums are: {1, 2, 6, 16, 48, 160, 576, 2176, 8448, 33280, 132096, ...} = {1, 2, 2*A242985(n)}. (modified by G. C. Greubel, Jan 09 2020)
LINKS
G. C. Greubel, Rows n = 0..100 of triangle, flattened
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 16*binomial(2^(n-3) + 1, 2) otherwise. - G. C. Greubel, Jan 09 2020
EXAMPLE
Triangle begins as:
1;
1, 1;
1, 4, 1;
1, 7, 7, 1;
1, 12, 22, 12, 1;
1, 21, 58, 58, 21, 1;
1, 38, 143, 212, 143, 38, 1;
MAPLE
q:=2; 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] + 2^(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) + 2^(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, 2): 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, 2) 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, 2) ))); # G. C. Greubel, Jan 09 2020
CROSSREFS
KEYWORD
nonn,tabl
AUTHOR
Roger L. Bagula, Nov 04 2008
EXTENSIONS
Edited by G. C. Greubel, Jan 09 2020
STATUS
approved