[go: up one dir, main page]

login
A368981
a(n) = Sum_{k=0..n} binomial(n, k - 1)*(1 - k)^(k - 1)*(n - k)*(n - k + 1)^(n - k).
4
0, 0, 2, 12, 168, 1720, 33360, 492324, 12510848, 242010864, 7645282560, 183157788220, 6930019734528, 198083231524776, 8738660263983104, 290276762478721620, 14634486747811184640, 554012204526293864416, 31427811840457845964800, 1335650409538235449288812, 84210181959664202315202560
OFFSET
0,3
FORMULA
Alternating row sums of A368849, negated.
MATHEMATICA
A368981[n_] :=Sum[Binomial[n, k-1] If[k == 1, 1, (1-k)^(k-1)] (n-k) (n-k+1)^(n-k), {k, 0, n}];
Array[A368981, 25, 0] (* Paolo Xausa, Jan 13 2024 *)
PROG
(SageMath)
def a(n):
return sum(binomial(n, k-1)*(1 - k)^(k - 1)*(n - k)*(n - k + 1)^(n - k)
for k in range(n + 1))
print([a(n) for n in range(0, 21)])
CROSSREFS
Cf. A368849.
Sequence in context: A226058 A120958 A030163 * A255163 A052728 A052729
KEYWORD
nonn
AUTHOR
Peter Luschny, Jan 11 2024
STATUS
approved