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

%I #49 Aug 08 2017 14:15:23

%S 0,1,1,1,0,-3,-9,-19,-32,-43,-39,5,128,377,783,1305,1728,1513,-367,

%T -5495,-15744,-32267,-53177,-69371,-58464,21693,235305,656909,1328896,

%U 2165489,2781855,2249009,-1161856,-10052911,-27385695,-54696687,-88125696,-111427091,-86075113,58797853,428575584,1140728485,2249936377

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

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

%H Robert Israel, <a href="/A143056/b143056.txt">Table of n, a(n) for n = 1..4300</a>

%F From _R. J. Mathar_, Oct 24 2008: (Start)

%F G.f.: x*(1-x-x^2)/(1-2*x+2*x^3+x^4).

%F a(n) = 2*a(n-1) -2*a(n-3) -a(n-4). (End)

%F 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

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

%p f:= Re @ gfun:-rectoproc({a(1)=0,a(2)=1,a(n) = (1+I)*a(n-1)+a(n-2)},a(n),remember):

%p seq(f(n),n=1..100); # _Robert Israel_, Apr 25 2016

%t 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}]

%t Re[Fibonacci[Range[0, 20], 1 + I]] (* _Vladimir Reshetnikov_, Apr 25 2016 *)

%o (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

%Y Cf. A272665 (the imaginary parts).

%K sign,easy

%O 1,6

%A _Roger L. Bagula_ and _Gary W. Adamson_, Oct 13 2008