OFFSET
0,3
COMMENTS
p divides a(p-1) for prime p>2. p^k divides a(p^k-1) for all prime p and integer k>1. p^2 divides a(2p) and a(2p-1) for prime p>2. (p^k)^2 divides a(2p^k) for prime p>2 and integer k>0. (p^k)^2 divides a(2p^k-1) for all prime p and integer k>1.
It seems that a(n) ~ k*n^n with k = e/(e+1). - Charles R Greathouse IV, May 26 2015
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..200
FORMULA
a(n) = Sum_{k=1..n} (-1)^(k+n)*k^n.
a(n) = (-1)^n*((-1+2^(n+1))*Zeta[ -n] + (-2)^n*((Zeta[ -n,(n+1)/2] - Zeta[ -n,(n+2)/2]))).
a(n) = n! * [x^n] exp(x)*(exp(n*x) + 1)/(exp(x) + 1). - Ilya Gutkovskiy, Apr 07 2018
G.f.: Sum_{k>=0} (k * x)^k/(1 + k * x). - Seiichi Manyama, Dec 03 2021
MATHEMATICA
Table[Sum[(-1)^(k+n)*k^n, {k, 1, n}], {n, 1, 25}]
PROG
(PARI) a(n)=abs(sum(i=1, n, i^n*(-1)^i)) \\ Charles R Greathouse IV, May 26 2015
(PARI) my(N=20, x='x+O('x^N)); Vec(sum(k=0, N, (k*x)^k/(1+k*x))) \\ Seiichi Manyama, Dec 03 2021
(Magma) [(-1)^n*(&+[(-1)^k*k^n: k in [0..n]]): n in [0..40]]; // G. C. Greubel, Nov 01 2022
(SageMath) [(-1)^n*sum((-1)^k*k^n for k in range(n+1)) for n in range(41)] # G. C. Greubel, Nov 01 2022
CROSSREFS
KEYWORD
nonn
AUTHOR
Alexander Adamchuk, Jul 22 2006
STATUS
approved