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.

A143056 a(n) = Re(b(n)) where b(n)=(1+i)*b(n-1)+b(n-2), with b(1)=0, b(2)=1.

Original entry on oeis.org

0, 1, 1, 1, 0, -3, -9, -19, -32, -43, -39, 5, 128, 377, 783, 1305, 1728, 1513, -367, -5495, -15744, -32267, -53177, -69371, -58464, 21693, 235305, 656909, 1328896, 2165489, 2781855, 2249009, -1161856, -10052911, -27385695, -54696687, -88125696, -111427091, -86075113, 58797853, 428575584, 1140728485, 2249936377
Offset: 1

Views

Author

Roger L. Bagula and Gary W. Adamson, Oct 13 2008

Keywords

Comments

The imaginary parts Im(b(n)) are given in A272665.

Examples

			The b(n) sequence (n>=1) is: 0, 1, 1+i, 1+2i, 4i, ...
		

Crossrefs

Cf. A272665 (the imaginary parts).

Programs

  • Maple
    f:= Re @ gfun:-rectoproc({a(1)=0,a(2)=1,a(n) = (1+I)*a(n-1)+a(n-2)},a(n),remember):
    seq(f(n),n=1..100); # Robert Israel, Apr 25 2016
  • Mathematica
    a[1] = 0; a[2] = 1; a[n_] := a[n] = (1+I)*a[n - 1] + a[n - 2]; Table[Re[a[n]], {n, 1, 30}]
    Re[Fibonacci[Range[0, 20], 1 + I]] (* Vladimir Reshetnikov, Apr 25 2016 *)
  • PARI
    x='x+O('x^50); Vec(x*(1-x-x^2)/(1-2*x+2*x^3+x^4)) \\ G. C. Greubel, Aug 08 2017

Formula

From R. J. Mathar, Oct 24 2008: (Start)
G.f.: x*(1-x-x^2)/(1-2*x+2*x^3+x^4).
a(n) = 2*a(n-1) -2*a(n-3) -a(n-4). (End)
a(n) = (sin((n-1)*theta)*(tau^(n-1) + (-tau)^(1-n))/phi^(3/2) + cos((n-1)*theta)*(tau^(n-1) - (-tau)^(1-n))*phi^(3/2))/(2*sqrt(5)), where phi=(1+sqrt(5))/2, tau=sqrt(phi+sqrt(phi)), theta=arctan(phi^(-3/2)). - Vladimir Reshetnikov, Oct 05 2016