login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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 (list; graph; refs; listen; history; text; internal format)
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

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 25 06:49 EDT 2024. Contains 371964 sequences. (Running on oeis4.)