login
A156049
Triangle read by rows: T(n, k) = binomial(n, k) + 2*(1 + n! - k! - (n-k)!).
1
1, 1, 1, 1, 4, 1, 1, 11, 11, 1, 1, 40, 48, 40, 1, 1, 197, 236, 236, 197, 1, 1, 1206, 1405, 1438, 1405, 1206, 1, 1, 8647, 9859, 10057, 10057, 9859, 8647, 1, 1, 70568, 79226, 80446, 80616, 80446, 79226, 70568, 1, 1, 645129, 715714, 724394, 725600, 725600, 724394, 715714, 645129, 1
OFFSET
0,5
COMMENTS
Row sum are: {1, 2, 6, 24, 130, 868, 6662, 57128, 541098, 5621676, 63682990, ...}.
FORMULA
T(n, k) = binomial(n, k) + 2*(1 + n! - k! - (n-k)!).
Sum_{k=0..n} T(n, k) = 2^n + 2*(n+1) - 2*(n+1)! - 4* !(n+1), where !n =
A003422(n). - G. C. Greubel, Dec 01 2019
EXAMPLE
Triangle begins as:
1;
1, 1;
1, 4, 1;
1, 11, 11, 1;
1, 40, 48, 40, 1;
1, 197, 236, 236, 197, 1;
1, 1206, 1405, 1438, 1405, 1206, 1;
1, 8647, 9859, 10057, 10057, 9859, 8647, 1;
1, 70568, 79226, 80446, 80616, 80446, 79226, 70568, 1;
MAPLE
seq(seq( binomial(n, k) + 2*(1+n!-k!-(n-k)!), k=0..n), n=0..10); # G. C. Greubel, Dec 01 2019
MATHEMATICA
Table[Binomial[n, k] +2*(1 +n! -k! -(n-k)!), {n, 0, 10}, {k, 0, n}]//Flatten
PROG
(PARI) T(n, k) = binomial(n, k) + 2*(1+n!-k!-(n-k)!); \\ G. C. Greubel, Dec 01 2019
(Magma) F:=Factorial; [Binomial(n, k) +2*(1 +F(n) -F(k) -F(n-k)): k in [0..n], n in [0..10]]; // G. C. Greubel, Dec 01 2019
(Sage) f=factorial; [[binomial(n, k) +2*(1 +f(n) -f(k) -f(n-k)) for k in (0..n)] for n in (0..10)] # G. C. Greubel, Dec 01 2019
(GAP) F:=Factorial;; Flat(List([0..10], n-> List([0..n], k-> Binomial(n, k) +2*(1 +F(n) -F(k) -F(n-k)) ))); # G. C. Greubel, Dec 01 2019
CROSSREFS
Cf. A003422.
Sequence in context: A157221 A146967 A173152 * A192015 A205946 A101919
KEYWORD
nonn,tabl
AUTHOR
Roger L. Bagula, Feb 02 2009
STATUS
approved