cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-7 of 7 results.

A115416 Imaginary part of (n + i)^n, with i=sqrt(-1).

Original entry on oeis.org

0, 1, 4, 26, 240, 2876, 42372, 740536, 14970816, 343603216, 8825080100, 250756091552, 7809130867824, 264489160965056, 9678967816041188, 380574552503498624, 16000787866533953280, 716309568462681538816
Offset: 0

Views

Author

Reinhard Zumkeller, Jan 22 2006

Keywords

Crossrefs

Cf. A000312, A009116, A115415 (real part).

Programs

  • 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 *)
  • 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

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

Extensions

More terms from Robert G. Wilson v, Jan 23 2006

A302584 a(n) = n! * [x^n] exp(n*x)/cos(x).

Original entry on oeis.org

1, 1, 5, 36, 357, 4500, 68857, 1239504, 25661545, 600655824, 15684383021, 452001644864, 14249852124365, 487836995500608, 18022519535240417, 714658089577017600, 30275849571771536977, 1364687729891761740032, 65213822241378992547925, 3293203845745202062590976
Offset: 0

Views

Author

Ilya Gutkovskiy, Apr 10 2018

Keywords

Crossrefs

Programs

  • Mathematica
    Table[n! SeriesCoefficient[Exp[n x]/Cos[x], {x, 0, n}], {n, 0, 19}]
    Table[(2 I)^n EulerE[n, (1 - I n)/2], {n, 0, 19}]

Formula

a(n) ~ n^n / cos(1). - Vaclav Kotesovec, Jun 08 2019

A302586 a(n) = n! * [x^n] exp(n*x)*tan(x).

Original entry on oeis.org

0, 1, 4, 29, 288, 3641, 55872, 1008349, 20923392, 490730641, 12836633600, 370512824285, 11697136754688, 400947361714121, 14829211483455488, 588633245015433437, 24960134277040177152, 1126038686507284428961, 53851620649898789830656, 2721385807644104827095965
Offset: 0

Views

Author

Ilya Gutkovskiy, Apr 10 2018

Keywords

Crossrefs

Programs

  • Mathematica
    Table[n! SeriesCoefficient[Exp[n x] Tan[x], {x, 0, n}], {n, 0, 19}]
    Table[I^(n + 1) 2^(n - 1) (EulerE[n, (-I/2) n] - EulerE[n, 1 - (I/2) n]), {n, 0, 19}]

Formula

a(n) ~ tan(1) * n^n. - Vaclav Kotesovec, Jun 08 2019

A121626 Real part of (1 + n*i)^n, where i=sqrt(-1).

Original entry on oeis.org

1, 1, -3, -26, 161, 2876, -27755, -740536, 9722113, 343603216, -5707904499, -250756091552, 5039646554593, 264489160965056, -6237995487261915, -380574552503498624, 10303367499652761601, 716309568462681538816, -21891769059478538933603
Offset: 0

Views

Author

Gary W. Adamson, Aug 12 2006

Keywords

Examples

			a(4) = 161 since (1 + 4i)^4 = (161 - 240i).
		

Crossrefs

Cf. A115415.
Cf. A370189 (imaginary part).

Programs

  • Mathematica
    a[n_] := Re[(1 + n*I)^n]; Array[a, 18] (* Robert G. Wilson v, Aug 17 2006 *)
  • PARI
    a(n) = real((1 + n*I)^n); \\ Michel Marcus, Feb 14 2024
    
  • Python
    from math import comb
    def A121626(n): return sum(comb(n,j)*n**j*(-1 if j&2 else 1) for j in range(0,n+1,2)) # Chai Wah Wu, Feb 15 2024

Formula

a(n) = (1/2) * ( (i+n)^n + (i-n)^n ) * i^(n*(2*n+1)). - Bruno Berselli, Jan 28 2014
a(n) = Sum_{j=0..floor(n/2)} binomial(n,2j)*n^(2j)*(-1)^j. - Chai Wah Wu, Feb 15 2024

Extensions

More terms from Robert G. Wilson v, Aug 17 2006

A121625 Real part of (n + n*i)^n.

Original entry on oeis.org

1, 1, 0, -54, -1024, -12500, 0, 6588344, 268435456, 6198727824, 0, -9129973459552, -570630428688384, -19384006821904192, 0, 56050417968750000000, 4722366482869645213696, 211773507042902211629312, 0, -1012950863698080557631477248, -107374182400000000000000000000
Offset: 0

Views

Author

Gary W. Adamson, Aug 12 2006

Keywords

Examples

			a(7) = 6588344 since (7 + 7i)^7 = (6588344 - 6588344i).
		

Crossrefs

Programs

  • Mathematica
    a[n_] := Re[(n + n*I)^n]; Array[a, 19] (* Robert G. Wilson v, Aug 17 2006 *)
  • 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

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)

Extensions

More terms from Robert G. Wilson v, Aug 17 2006
a(0)=1 prepended by Alois P. Heinz, Dec 19 2020

A370189 Imaginary part of (1 + n*i)^n, where i is the imaginary unit.

Original entry on oeis.org

0, 1, 4, -18, -240, 1900, 42372, -482552, -14970816, 222612624, 8825080100, -161981127968, -7809130867824, 170561613679808, 9678967816041188, -245159013138710400, -16000787866533953280, 461102348510408544512, 34017524842099233036996, -1098983344602124698522112, -90417110945911655996319600
Offset: 0

Views

Author

Hugo Pfoertner, Feb 14 2024

Keywords

Comments

The ratio a(n)/A121626(n) converges to c for odd n and to -1/c for even n for n -> oo with c = 0.6420926... (= cot(1) (A073449) from Moritz Firsching, Feb 14 2024). See linked plots.

Crossrefs

Cf. A121626 (real part), A115415, A115416.
Cf. A073449.

Programs

  • Mathematica
    Array[Im[(1+#*I)^#] &, 25, 0] (* Paolo Xausa, Feb 19 2024 *)
  • PARI
    a370189(n) = imag((1+I*n)^n)
    
  • Python
    from math import comb
    def A370189(n): return sum(comb(n,j)*n**j*(-1 if j-1&2 else 1) for j in range(1,n+1,2)) # Chai Wah Wu, Feb 15 2024

Formula

a(n) = Sum_{j=0..floor((n-1)/2)} binomial(n,2*j+1)*n^(2*j+1)*(-1)^j. - Chai Wah Wu, Feb 15 2024

A176302 a(n) = floor(abs( (i+n)^n )) where "i" is the Imaginary unit.

Original entry on oeis.org

1, 5, 31, 289, 3446, 50653, 883883, 17850625, 409413666, 10510100501, 298523873866, 9294114390625, 314715395761089, 11514990476898413, 452702917746710142, 19031147999601100801, 851888944448164153708
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Magma
    C := ComplexField(); [Floor(Abs( (n+I)^n )): n in [1..30]]; // G. C. Greubel, Nov 26 2019
    
  • Maple
    seq(floor(abs((n+I)^n)), n = 1..30); # G. C. Greubel, Nov 26 2019
  • Mathematica
    Table[Floor@Abs[(I + n)^n], {n,30}]
  • PARI
    default(realprecision, 50); vector(30, n, (abs((I+n)^n))\1 ) \\ G. C. Greubel, Nov 26 2019
    
  • Sage
    [floor(abs( (n+i)^n )) for n in (1..30)] # G. C. Greubel, Nov 26 2019
Showing 1-7 of 7 results.