login
A155162
Triangle T(n,k) = binomial(n, k)*(k! + (n-k)!), read by rows.
2
2, 2, 2, 3, 4, 3, 7, 9, 9, 7, 25, 28, 24, 28, 25, 121, 125, 80, 80, 125, 121, 721, 726, 390, 240, 390, 726, 721, 5041, 5047, 2562, 1050, 1050, 2562, 5047, 5041, 40321, 40328, 20216, 7056, 3360, 7056, 20216, 40328, 40321, 362881, 362889, 181512, 60984, 18144, 18144, 60984, 181512, 362889, 362881
OFFSET
0,1
FORMULA
T(n,k) = binomial(n, k)*(k! + (n-k)!).
Sum_{k=0..n} T(n, k) = 2*A000522(n) = A054091(n+1). - G. C. Greubel, Mar 19 2021
EXAMPLE
Triangle begins as:
2;
2, 2;
3, 4, 3;
7, 9, 9, 7;
25, 28, 24, 28, 25;
121, 125, 80, 80, 125, 121;
721, 726, 390, 240, 390, 726, 721;
5041, 5047, 2562, 1050, 1050, 2562, 5047, 5041;
40321, 40328, 20216, 7056, 3360, 7056, 20216, 40328, 40321;
362881, 362889, 181512, 60984, 18144, 18144, 60984, 181512, 362889, 362881;
MAPLE
A155162:= (n, k)-> binomial(n, k)*(k! + (n-k)!); seq(seq(A155162(n, k), k=0..n), n=0..12); # G. C. Greubel, Mar 19 2021
MATHEMATICA
Table[Binomial[n, k](k! +(n-k)!), {n, 0, 12}, {k, 0, n}]//Flatten
PROG
(Magma) [Binomial(n, k)*(Factorial(k) + Factorial(n-k)): k in [0..n], n in [0..12]]; // G. C. Greubel, Mar 19 2021
(Sage) flatten([[binomial(n, k)*(factorial(k) + factorial(n-k)) for k in (0..n)] for n in (0..12)]) # G. C. Greubel, Mar 19 2021
CROSSREFS
Sequence in context: A029158 A241953 A156197 * A275444 A243322 A071454
KEYWORD
nonn,tabl
AUTHOR
Roger L. Bagula, Jan 21 2009
EXTENSIONS
Edited by G. C. Greubel, Mar 19 2021
STATUS
approved