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-4 of 4 results.

A006495 Real part of (1 + 2*i)^n, where i is sqrt(-1).

Original entry on oeis.org

1, 1, -3, -11, -7, 41, 117, 29, -527, -1199, 237, 6469, 11753, -8839, -76443, -108691, 164833, 873121, 922077, -2521451, -9653287, -6699319, 34867797, 103232189, 32125393, -451910159, -1064447283, 130656229, 5583548873
Offset: 0

Views

Author

Keywords

Comments

Row sums of the Euler related triangle A117411. Partial sums are A006495. - Paul Barry, Mar 16 2006
Binomial transform of [1, 0, -4, 0, 16, 0, -64, 0, 256, 0, ...], i.e. powers of -4 with interpolated zeros. - Philippe Deléham, Dec 02 2008
The absolute values of these numbers are the odd numbers y such that x^2 + y^2 = 5^n with x and y coprime. See A098122. - T. D. Noe, Apr 14 2011
Pisano period lengths: 1, 1, 8, 1, 4, 8, 48, 4, 24, 4, 60, 8, 12, 48, 8, 8, 16, 24, 90, 4, ... - R. J. Mathar, Aug 10 2012
Multiplied by a signed sequence of 2's we obtain 2, -2, -6, 22, -14, -82, 234, -58, -1054, 2398, 474, -12938, ..., the Lucas V(-2,5) sequence. - R. J. Mathar, Jan 08 2013

Examples

			1 + x - 3*x^2 - 11*x^3 - 7*x^4 + 41*x^5 + 117*x^6 + 29*x^7 - 527*x^8 + ...
		

References

  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Cf. A006496, A045873 (partial sums).

Programs

  • Magma
    A006495:=func< n | Integers()!Real((1+2*Sqrt(-1))^n) >; [ A006495(n): n in [0..30] ]; // Klaus Brockhaus, Feb 04 2011
    
  • Maple
    a := n -> hypergeom([1/2 - n/2, -n/2], [1/2], -4):
    seq(simplify(a(n)), n=0..28); # Peter Luschny, Jul 26 2020
  • Mathematica
    Table[Re[(1+2I)^n],{n,0,29}] (* Giovanni Resta, Mar 28 2006 *)
  • PARI
    {a(n) = local(A); n++; if( n<1, 0, A = vector(n); A[1] = 1; for( k=2, n, A[k] = (4*k + 1) * A[k-1] - 8 * sum( j=1, k-1, A[j] * A[k-j])); A[n])} /* Michael Somos, Jul 23 2011 */
    
  • PARI
    a(n) = real( (1 + 2*I)^n ) \\ Charles R Greathouse IV, Nov 21 2014
    
  • PARI
    {a(n) = my(A=1);
    A = sum(m=0, n+1, (1 + (-1)^m*I)^m * x^m / (1 - (-1)^m*I*x +x*O(x^n))^(m+1) ); polcoeff(A, n)} \\ Paul D. Hanna, Mar 09 2019
  • Sage
    [lucas_number2(n,2,5)/2 for n in range(0,30)] # Zerinvary Lajos, Jul 08 2008
    

Formula

a(n) = (1/2)*((1+2*i)^n + (1-2*i)^n). - Benoit Cloitre, Oct 28 2002
From Paul Barry, Mar 16 2006: (Start)
G.f.: (1-x)/(1 - 2*x + 5*x^2);
a(n) = 2*a(n-1) - 5*a(n-2);
a(n) = 5^(n/2)*cos(n*atan(1/3) + Pi*n/4);
a(n) = Sum_{k=0..n} Sum_{j=0..n-k} C(n,k-j)*C(j,n-k)*(-4)^(n-k). (End)
A000351(n) = a(n)^2 + A006496(n)^2. - Fabrice Baubet (intih(AT)free.fr), May 28 2007
a(n) = upper left and lower right terms of the 2 X 2 matrix [1,-2; 2,1]^n. - Gary W. Adamson, Mar 28 2008
a(n) = Sum_{k=0..n} A124182(n,k)*(-5)^(n-k). - Philippe Deléham, Nov 01 2008
a(n) = Sum_{k=0..n} A098158(n,k)*(-4)^(n-k). - Philippe Deléham, Nov 14 2008
a(n) = (4*n+5)*a(n-1) - 8*Sum_{k=1..n} a(k-1)*a(n-k) if n > 0. - Michael Somos, Jul 23 2011
E.g.f.: exp(x)*cos(2*x). - Sergei N. Gladkovskii, Jul 22 2012
a(n) = 5^(n/2) * cos(n*arctan(2)). - Sergei N. Gladkovskii, Aug 13 2012
G.f.: G(0)/2, where G(k)= 1 + 1/(1 - x*(4*k+1)/(x*(4*k+5) + 1/G(k+1))); (continued fraction). - Sergei N. Gladkovskii, May 26 2013
From Paul D. Hanna, Mar 09 2019: (Start)
G.f.: Sum_{n>=0} (1 + (-1)^n*i)^n * x^n / (1 - (-1)^n*i*x)^(n+1).
G.f.: Sum_{n>=0} (1 - (-1)^n*i)^n * x^n / (1 + (-1)^n*i*x)^(n+1).
(End)
a(n) = hypergeom([1/2 - n/2, -n/2], [1/2], -4). - Peter Luschny, Jul 26 2020

Extensions

Signs from Christian G. Bower, Nov 15 1998
Corrected by Giovanni Resta, Mar 28 2006

A006496 Imaginary part of (1+2i)^n.

Original entry on oeis.org

0, 2, 4, -2, -24, -38, 44, 278, 336, -718, -3116, -2642, 10296, 33802, 16124, -136762, -354144, -24478, 1721764, 3565918, -1476984, -20783558, -34182196, 35553398, 242017776, 306268562, -597551756, -2726446322, -2465133864, 8701963882, 29729597084, 15949374758
Offset: 0

Views

Author

Keywords

Comments

The absolute values of these numbers are the even numbers x such that x^2 + y^2 = 5^n with x and y coprime. See A098122. - T. D. Noe, Apr 14 2011

References

  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Programs

Formula

a(n) = 2*a(n-1) - 5*a(n-2); a(0)=0, a(1)=2. - T. D. Noe, Nov 09 2006
A000351(n) = A006495(n)^2 + a(n)^2. - Fabrice Baubet, May 28 2007
From R. J. Mathar, Apr 06 2008: (Start)
O.g.f.: 2*x/(1 - 2*x + 5*x^2).
a(n) = 2*A045873(n). (End)
E.g.f.: exp(x)*sin(2*x). - Sergei N. Gladkovskii, Jul 22 2012
a(n)/A006495(n) = -tan(2*n*arctan(phi)), where phi is the golden ratio (A001622). - Amiram Eldar, Jan 13 2022

Extensions

Signs from Christian G. Bower, Nov 15 1998
Corrected by T. D. Noe, Nov 09 2006
More terms from R. J. Mathar, Apr 06 2008

A176594 a(n) = 5^(2^n).

Original entry on oeis.org

5, 25, 625, 390625, 152587890625, 23283064365386962890625, 542101086242752217003726400434970855712890625, 293873587705571876992184134305561419454666389193021880377187926569604314863681793212890625
Offset: 0

Views

Author

Vincenzo Librandi, Apr 21 2010

Keywords

Comments

Also the hypotenuse of primitive Pythagorean triangles obtained by repeated application of basic formula c(n)=p(n)^2+q(n)^2 starting p(0)=2, q(0)=1, see A100686, A098122. Example: a(2)=25 since starting (2,1) gives Pythagorean triple (3,4,5) using (3,4) as new generators gives triple (7,24,25) hypotenuse 25=a(2). - Carmine Suriano, Feb 04 2011

Crossrefs

Programs

Formula

a(n) = A165423(n+3).
a(n+1) = a(n)^2 with a(0)=5.
a(n-1) = (Im((2+i)^(2^n))^2 + Re((2+i)^(2^n))^2)^(1/2). - Carmine Suriano, Feb 04 2011
Sum_{n>=0} 1/a(n) = A078886. - Amiram Eldar, Nov 09 2020
Product_{n>=0} (1 + 1/a(n)) = 5/4. - Amiram Eldar, Jan 29 2021

Extensions

Offset corrected by R. J. Mathar, Jun 18 2010

A158936 List of coprime pairs (x,y) such that x^2+y^2 = 13^n with 0

Original entry on oeis.org

0, 1, 2, 3, 5, 12, 9, 46, 119, 120, 122, 597, 828, 2035, 4449, 6554, 239, 28560, 56403, 86158, 145668, 341525, 246046, 1315911, 3369960, 3455641, 3627003, 17021162, 23161315, 58317492, 128629846, 186118929, 13651680, 815616479, 1590277918, 2474152797, 4241902555, 9719139348, 6712571031, 37641223154, 95420159401, 99498527400, 107655263398, 485257533003
Offset: 0

Views

Author

Zak Seidov, Apr 10 2011

Keywords

Comments

For n>2, all other solutions (x,y) are divisible by 13, e.g., 26^2+39^2=13^3.

Examples

			n=1: 13^1=2^2+3^2, hence a(1)=2, a(2)=3,
n=2: 13^2=5^2+12^2, hence a(3)=5, a(4)=12.
		

Crossrefs

Cf. A098122 for case x^2+y^2=5^n.
Cf. A188948, A188949 for the values of x and y separately.
Cf. A188982, A188983 for even and odd terms.

Programs

  • Maple
    f:= proc(n) local q;
      q:= map(abs, [Re,Im]((2+3*I)^n));
      op(sort(q))
    end proc:
    map(f, [$0..50]); # Robert Israel, Feb 27 2024
  • Mathematica
    s={2,3};x=2;y=3;Do[A=3x+2y;If[Mod[A,13]==0,A=Abs[3x-2y];B=2x+3y,B=Abs[2x-3y]];x=A;If[A>B,x=B;y=A,y=B];s=Join[s,{x,y}],{20}];s
    Table[Select[PowersRepresentations[13^n, 2, 2], CoprimeQ @@ # &][[1]], {n, 0, 21}] (* T. D. Noe, Apr 12 2011 *)

Formula

a(2*n) = min(|Re((3+2*i)^n)|, |Im((3+2*i)^n)|), a(2*n+1) = max(|Re((3+2*i)^n)|, |Im((3+2*i)^n)|). - Robert Israel, Feb 27 2024
Showing 1-4 of 4 results.