login
A158198
Triangle T(n, k) = Sum_{j=0..k-1} (-1)^j*binomial(k, j+1)*(k-j)^(n-k), read by rows.
1
1, 1, 1, 1, 3, 1, 1, 7, 4, 1, 1, 15, 16, 5, 1, 1, 31, 58, 25, 6, 1, 1, 63, 196, 125, 36, 7, 1, 1, 127, 634, 601, 216, 49, 8, 1, 1, 255, 1996, 2765, 1296, 343, 64, 9, 1, 1, 511, 6178, 12265, 7656, 2401, 512, 81, 10, 1, 1, 1023, 18916, 52925, 44136, 16807, 4096, 729, 100, 11, 1
OFFSET
1,5
FORMULA
T(n, k) = Sum_{j=0..k-1} (-1)^j*binomial(k, j+1)*(k-j)^(n-k).
EXAMPLE
Triangle begins
1;
1, 1;
1, 3, 1;
1, 7, 4, 1;
1, 15, 16, 5, 1;
1, 31, 58, 25, 6, 1;
1, 63, 196, 125, 36, 7, 1;
1, 127, 634, 601, 216, 49, 8, 1;
1, 255, 1996, 2765, 1296, 343, 64, 9, 1;
a(8,4) = 1*4*4^4 - 1*6*3^4 + 1*4*2^4 - 1*1*1^4 = 1024 - 486 + 64 - 1 = 601.
MATHEMATICA
Table[Sum[(-1)^j*Binomial[k, j+1]*(k-j)^(n-k), {j, 0, k-1}], {n, 12}, {k, n}]//Flatten (* G. C. Greubel, Jun 26 2021 *)_
PROG
(PARI) tabl(nn) = {for (n=1, nn, for (k=1, n, print1(sum(i=0, k-1, (-1)^i*binomial(k, i+1)*(k-i)^(n-k)), ", "); ); print(); ); } \\ Michel Marcus, Jun 19 2013
(Magma)
[(&+[(-1)^j*Binomial(k, j+1)*(k-j)^(n-k): j in [0..k-1]]): k in [1..n], n in [1..12]]; // G. C. Greubel, Jun 26 2021
(Sage)
flatten([[ sum( (-1)^j*binomial(k, j+1)*(k-j)^(n-k) for j in (0..k-1)) for k in (1..n)] for n in (1..12)]) # G. C. Greubel, Jun 26 2021
CROSSREFS
Column 2 is A000225, column 3 is A168583. - Michel Marcus, Jun 19 2013
Sequence in context: A121300 A283595 A128119 * A158793 A112996 A205099
KEYWORD
nonn,tabl
AUTHOR
Thomas J Engelsma (tom(AT)opertech.com), Mar 13 2009
STATUS
approved