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.

A121622 Real part of (3 + 2i)^n.

Original entry on oeis.org

1, 3, 5, -9, -119, -597, -2035, -4449, -239, 56403, 341525, 1315911, 3455641, 3627003, -23161315, -186118929, -815616479, -2474152797, -4241902555, 6712571031, 95420159401, 485257533003, 1671083125805, 3718150825791, 584824319281
Offset: 0

Views

Author

Gary W. Adamson and Nick Williams, Aug 10 2006

Keywords

Comments

Companion sequence A121621 is real((2 + 3i)^n).

Examples

			a(5) = -597 since (3 + 2i)^5 = (-597 + 122i).
a(5) = -597 = 6*(-119) - 13*(-9) = 6*a(5) -13*a(4).
		

Crossrefs

Programs

  • Mathematica
    f[n_] := Re[(3 + 2I)^n]; Table[f[n], {n, 0, 24}] (* Robert G. Wilson v, Aug 17 2006 *)
    LinearRecurrence[{6,-13},{1,3},30] (* Harvey P. Dale, Apr 24 2017 *)
  • PARI
    a(n) = real((3 + 2*I)^n); \\ Michel Marcus, Jun 12 2021

Formula

a(n) = real((3 + 2i)^n).
a(n) = 6*a(n-1) - 13*a(n-2).
G.f.: ( 1-3*x ) / ( 1-6*x+13*x^2 ). - R. J. Mathar, Aug 12 2012
E.g.f.: exp(3*x)*cos(2*x). - Sergei N. Gladkovskii, Jan 20 2014

Extensions

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