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”).

A115416
Imaginary part of (n + i)^n, with i=sqrt(-1).
8
0, 1, 4, 26, 240, 2876, 42372, 740536, 14970816, 343603216, 8825080100, 250756091552, 7809130867824, 264489160965056, 9678967816041188, 380574552503498624, 16000787866533953280, 716309568462681538816
OFFSET
0,3
LINKS
FORMULA
a(n) = n! * [x^n] exp(n*x)*sin(x). - Ilya Gutkovskiy, Apr 10 2018
a(n) ~ sin(1) * n^n. - Vaclav Kotesovec, Jun 08 2019
a(n) = Sum_{j=0..floor((n-1)/2)} binomial(n,2*j+1)*n^(n-2*j-1)*(-1)^j. - Chai Wah Wu, Feb 15 2024
a(n) = -(i/2)*((n + i)^n - (n - i)^n) where i is the imaginary unit. - Gerry Martens, Dec 30 2024
MAPLE
seq(Im((n+I)^n), n=0..20); # Robert Israel, Dec 30 2024
MATHEMATICA
Table[Im[(n + I)^n], {n, 0, 17}] (* Robert G. Wilson v, Jan 23 2006 *)
PROG
(PARI) a(n) = imag((n + I)^n); \\ Michel Marcus, Apr 11 2018
(Python)
from math import comb
def A115416(n): return sum(comb(n, j)*n**(n-j)*(-1 if j-1&2 else 1) for j in range(1, n+1, 2)) # Chai Wah Wu, Feb 15 2024
CROSSREFS
Cf. A000312, A009116, A115415 (real part).
Sequence in context: A317339 A304338 A377104 * A302606 A052577 A203935
KEYWORD
nonn,changed
AUTHOR
Reinhard Zumkeller, Jan 22 2006
EXTENSIONS
More terms from Robert G. Wilson v, Jan 23 2006
STATUS
approved