OFFSET
1,2
COMMENTS
The corresponding values of y are given by a(n+2).
Also the solutions to 21x^2-20 is a perfect square. - Jaimal Ichharam, Jul 13 2014
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..1000
Index entries for linear recurrences with constant coefficients, signature (0,5,0,-1).
FORMULA
a(n) = 5*a(n-2)-a(n-4).
G.f.: -x*(x-1)*(x^2+3*x+1) / (x^4-5*x^2+1).
EXAMPLE
9 is in the sequence because (x, y) = (9, 43) is a solution to x^2 - 5xy + y^2 + 5 = 0.
MAPLE
A237254 := proc(n)
coeftayl( -x*(x-1)*(x^2+3*x+1) / (x^4-5*x^2+1), x=0, n);
end proc:
seq(A237254(n), n=1..40); # Wesley Ivan Hurt, Jul 14 2014
MATHEMATICA
Rest[CoefficientList[Series[- x (x - 1) (x^2 + 3 x + 1)/(x^4 - 5 x^2 + 1), {x, 0, 40}], x]] (* Vincenzo Librandi, Jul 01 2014 *)
LinearRecurrence[{0, 5, 0, -1}, {1, 2, 3, 9}, 40] (* Harvey P. Dale, Aug 24 2024 *)
PROG
(PARI) Vec(-x*(x-1)*(x^2+3*x+1)/(x^4-5*x^2+1) + O(x^100))
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Colin Barker, Feb 05 2014
STATUS
approved