OFFSET
1,2
COMMENTS
Also positive integers x in the solutions to 4*x^2 - 5*y^2 - 2*x + 5*y - 2 = 0, the corresponding values of y being A254627.
LINKS
Colin Barker, Table of n, a(n) for n = 1..1000
Index entries for linear recurrences with constant coefficients, signature (1,18,-18,-1,1).
FORMULA
a(n) = a(n-1)+18*a(n-2)-18*a(n-3)-a(n-4)+a(n-5).
G.f.: -x*(x^4+x^3-8*x^2+x+1) / ((x-1)*(x^2-4*x-1)*(x^2+4*x-1)).
a(n) = (2 + (2-r)^n - (-2-r)^n*(-2+r) + 2*(-2+r)^n + r*(-2+r)^n + (2+r)^n)/8 where r = sqrt(5). - Colin Barker, Nov 25 2016
a(n+2) - a(n) = A000032(3*n + 2) if n is odd, A000032(3*n + 1) if n is even. - Diego Rattaggi, May 11 2020
EXAMPLE
12 is in the sequence because the 12th hexagonal number is 276, which is also the 11th centered pentagonal number.
PROG
(PARI) Vec(-x*(x^4+x^3-8*x^2+x+1)/((x-1)*(x^2-4*x-1)*(x^2+4*x-1)) + O(x^100))
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Colin Barker, Feb 11 2015
STATUS
approved