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!)
A370359 Imaginary part of (n + n*i)^n where i = sqrt(-1). 1
0, 1, 8, 54, 0, -12500, -373248, -6588344, 0, 6198727824, 320000000000, 9129973459552, 0, -19384006821904192, -1422336873671426048, -56050417968750000000, 0, 211773507042902211629312, 20145360934551827238617088, 1012950863698080557631477248, 0, -5982809106827246101894271407104 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,3
LINKS
FORMULA
a(n) = n^n*A009545(n) = n^n*Sum_{j=0..floor((n-1)/2)} binomial(n,2*j+1)*(-1)^j.
a(n) = 0 if and only if n == 0 mod 4.
a(4n) = 0.
a(4n+1) = (4n+1)^(4n+1)*(-4)^n.
a(4n+2) = 2*(4n+2)^(4n+2)*(-4)^n.
a(4n+3) = 2*(4n+3)^(4n+3)*(-4)^n.
PROG
(Python)
def A370359(n): return n**n*((0, 1, 2, 2)[n&3]<<((n>>1)&-2))*(-1 if n&4 else 1)
(PARI) a(n) = imag((n + n*I)^n); \\ Michel Marcus, Feb 16 2024
CROSSREFS
Sequence in context: A054418 A293115 A337554 * A070928 A180095 A234955
KEYWORD
sign
AUTHOR
Chai Wah Wu, Feb 16 2024
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 August 12 17:00 EDT 2024. Contains 375113 sequences. (Running on oeis4.)