login
Expansion of x/(x^4-x^3-2x^2-x+1).
4

%I #17 Mar 15 2024 12:50:08

%S 0,1,1,3,6,12,26,53,111,231,480,1000,2080,4329,9009,18747,39014,81188,

%T 168954,351597,731679,1522639,3168640,6594000,13722240,28556241,

%U 59426081,123666803,257352966,535556412,1114503066,2319302053

%N Expansion of x/(x^4-x^3-2x^2-x+1).

%C If P(x),Q(x) are n-th and (n-1)-th Fibonacci polynomials, then a(n)=real part of the product of P(I) and conjugate Q(I).

%H <a href="/index/Tu#2wis">Index entries for two-way infinite sequences</a>

%H <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (1,2,1,-1).

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

%e Fibonacci polynomials P(5)=1+4x+3x^2, P(4)=1+3x+x^2. Conjugate product evaluated at I is (-2+4I)*(-3I)=12-6I and so a(5)=12.

%t CoefficientList[Series[x/(x^4-x^3-2x^2-x+1),{x,0,40}],x] (* or *) LinearRecurrence[{1,2,1,-1},{0,1,1,3},40] (* _Harvey P. Dale_, Feb 27 2015 *)

%o (PARI) a(n)=local(m);if(n<1,if(n>-3,0,-a(-2-n)),m=contfracpnqn(matrix(2,n,i,j,I));real(m[1,1]*conj(m[2,1])))

%K nonn,easy

%O 0,4

%A _Michael Somos_, Mar 11 2004