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!)
A121625 Real part of (n + n*i)^n. 3
1, 1, 0, -54, -1024, -12500, 0, 6588344, 268435456, 6198727824, 0, -9129973459552, -570630428688384, -19384006821904192, 0, 56050417968750000000, 4722366482869645213696, 211773507042902211629312, 0, -1012950863698080557631477248, -107374182400000000000000000000 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,4
LINKS
FORMULA
a(n) = Re(n + n*i)^n.
From Chai Wah Wu, Feb 15 2024: (Start)
a(n) = n^n*Re((1+i)^n) = n^n*A146559(n) = n^n*Sum_{n=0..floor(n/2)} binomial(n,2j)*(-1)^j.
a(n) = 0 if and only if n==2 mod 4, as (1+i)^2=2i is purely imaginary, (1+i)^4=-4 is a nonzero real and (1+i) and (1+i)^3=-2+2i both have nonzero real parts.
(End)
EXAMPLE
a(7) = 6588344 since (7 + 7i)^7 = (6588344 - 6588344i).
MATHEMATICA
a[n_] := Re[(n + n*I)^n]; Array[a, 19] (* Robert G. Wilson v, Aug 17 2006 *)
PROG
(PARI) a(n) = real((n + n*I)^n); \\ Michel Marcus, Dec 19 2020
(Python)
def A121625(n): return n**n*((1, 1, 0, -2)[n&3]<<((n>>1)&-2))*(-1 if n&4 else 1) # Chai Wah Wu, Feb 16 2024
CROSSREFS
Sequence in context: A324952 A298718 A245832 * A341940 A190399 A071803
KEYWORD
sign
AUTHOR
Gary W. Adamson, Aug 12 2006
EXTENSIONS
More terms from Robert G. Wilson v, Aug 17 2006
a(0)=1 prepended by Alois P. Heinz, Dec 19 2020
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 July 12 23:13 EDT 2024. Contains 374257 sequences. (Running on oeis4.)