login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A120485
a(n) = n^n - (n-1)^n + (n-2)^n - ... + (-1)^(k+n)*k^n + ... + (-1)^(2+n)*2^n + (-1)^(1+n)*1^n = Sum_{k=1..n} (-1)^(k+n)*k^n.
12
1, 1, 3, 20, 190, 2313, 34461, 607408, 12360636, 285188825, 7356173275, 209762134236, 6552069616170, 222481706868337, 8159714626124985, 321456928026650816, 13538204870285608696, 606979028986115413329
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
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
Main diagonal of A091884.
Sequence in context: A176043 A108206 A349959 * A087152 A158833 A296715
KEYWORD
nonn
AUTHOR
Alexander Adamchuk, Jul 22 2006
STATUS
approved