OFFSET
1,2
LINKS
Colin Barker, Table of n, a(n) for n = 1..400
Index entries for linear recurrences with constant coefficients, signature (1,39202,-39202,-1,1).
FORMULA
a(n) = a(n-1) + 39202*a(n-2) - 39202*a(n-3) - a(n-4) + a(n-5) for n>5.
G.f.: x*(1 + 28*x - 5938*x^2 + 28*x^3 + x^4)/((1 - x)*(1 - 198*x + x^2)*(1 + 198*x + x^2)).
EXAMPLE
29 is in the sequence because 5*29-1 = 144 = 12^2, and 10*29-1 = 289 = 17^2.
MATHEMATICA
Rest@ CoefficientList[Series[x (1 + 28 x- 5938 x^2 + 28 x^3 + x^4) / ((1 - x) (1 - 198 x + x^2) (1 + 198 x + x^2)), {x, 0, 17}], x] (* Michael De Vlieger, Jun 27 2016 *)
PROG
(PARI) Vec(x*(1+x)*(1-6*x+x^2)/((1-x)*(1-34*x+x^2)*(1+x+x^2)) + O(x^20))
(PARI) isok(n) = issquare(5*n-1) && issquare(10*n-1); \\ Michel Marcus, Jun 28 2016
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Colin Barker, Jun 27 2016
STATUS
approved