OFFSET
1,4
COMMENTS
The (absolute) ratio approaches 1.744900645213449...
LINKS
Robert Israel, Table of n, a(n) for n = 1..4120
Index entries for linear recurrences with constant coefficients, signature (2,1,-2,-2).
FORMULA
a(n) = Re(b(n)) where b(1) = 0, b(2) = 1, b(n) = b(n-1)+(1+i)*b(n-2).
From R. J. Mathar, Oct 24 2008: (Start)
G.f.: x^2*(1 - x - x^2)/(1-2*x-x^2+2*x^3+2*x^4).
a(n) = 2*a(n-1) + a(n-2) - 2*a(n-3) - 2*a(n-4). (End)
EXAMPLE
The imaginary part is: {0, 0, 0, 1, 2, 5, 10, 19, 34, 57, 90, 131, 170, 177, 82, -261, -1134, -3047, -6870, -13997, -26502, -47167, -79102, -124373, -180510, -232855, -239270, -101629, 384202, 1611025, 4288050,..}.
MAPLE
f:= gfun:-rectoproc({-a(n+4)+2*a(n+3)+a(n+2)-2*a(n+1)-2*a(n), a(1) = 0, a(2) = 1, a(3) = 1, a(4) = 2}, a(n), remember):
map(f, [$1..30]); # Robert Israel, Jul 17 2016
MATHEMATICA
Clear[a, n]; a[0] = 0; a[1] = 1; a[n_] := a[n] = a[n - 1] + (1 + I)*a[n - 2]; Table[Re[a[n]], {n, 0, 30}]
CoefficientList[Series[x (1 - x - x^2) / (1 - 2 x - x^2 + 2 x^3 + 2 x^4), {x, 0, 33}], x] (* Vincenzo Librandi, Jul 18 2016 *)
LinearRecurrence[{2, 1, -2, -2}, {0, 1, 1, 2}, 40] (* Harvey P. Dale, Oct 26 2019 *)
PROG
(Magma) I:=[0, 1, 1, 2]; [n le 4 select I[n] else 2*Self(n-1) +Self(n-2)-2*Self(n-3)-2*Self(n-4): n in [1..40]]; // Vincenzo Librandi, Jul 18 2016
CROSSREFS
KEYWORD
sign
AUTHOR
Roger L. Bagula and Gary W. Adamson, Oct 13 2008
EXTENSIONS
Edited by Robert Israel, Jul 17 2016
STATUS
approved