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
KEYWORD
nonn
AUTHOR
Peter Luschny, Jan 11 2024
STATUS
approved