OFFSET
1,2
COMMENTS
Also positive integers y in the solutions to 2*x^2 - 5*y^2 + 5*y - 2 = 0, the corresponding values of x being A129557.
LINKS
Colin Barker, Table of n, a(n) for n = 1..1000
Index entries for linear recurrences with constant coefficients, signature (1,38,-38,-1,1).
FORMULA
a(n) = a(n-1) + 38*a(n-2) - 38*a(n-3) - a(n-4) + a(n-5).
G.f.: x*(2*x^3 + 19*x^2 - 2*x - 1) / ((x-1)*(x^2 - 6*x - 1)*(x^2 + 6*x - 1)).
a(n) = (1/40)*(20 - b^n*(19 + 3*b) + (3 + b)*c^n - (b^n*(3 + b) + (1 - 3*b)*c^n)*(-1)^n) with b = sqrt(10) - 3 and c = sqrt(10) + 3. - Alan Michael Gómez Calderón, Jul 02 2024
EXAMPLE
3 is in the sequence because the 3rd centered pentagonal number is 16, which is also the 4th square number.
MATHEMATICA
LinearRecurrence[{1, 38, -38, -1, 1}, {1, 3, 22, 96, 817}, 30] (* Harvey P. Dale, Mar 27 2017 *)
PROG
(PARI) Vec(x*(2*x^3+19*x^2-2*x-1) / ((x-1)*(x^2-6*x-1)*(x^2+6*x-1)) + O(x^100))
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Colin Barker, Jan 28 2015
STATUS
approved