OFFSET
1,1
COMMENTS
The corresponding values of y are in A221875.
LINKS
Colin Barker, Table of n, a(n) for n = 1..1000
Index entries for linear recurrences with constant coefficients, signature (0,38,0,-1).
FORMULA
G.f.: 2*x*(1 + x)*(1 + 10*x + x^2) / ((1 + 6*x - x^2)*(1 - 6*x - x^2)).
a(n) = 38*a(n-2) - a(n-4) for n>4.
a(n) = ((3-r)^n + (-3-r)^n*(-3+r) - 3*(-3+r)^n - r*(-3+r)^n + (3+r)^n)/2, where r=sqrt(10).
EXAMPLE
22 is in the sequence because (x, y) = (22, 7) is a solution to x^2 - 10*y^2 = -6.
MATHEMATICA
CoefficientList[ Series[(2 (1 + 11x + 11x^2 + x^3))/(1 - 38x^2 + x^4), {x, 0, 21}], x] (* or *)
LinearRecurrence[{0, 38, 0, -1}, {2, 22, 98, 838}, 22] (* Robert G. Wilson v, Jan 26 2017 *)
PROG
(PARI) Vec(2*x*(1 + x)*(1 + 10*x + x^2) / ((1 + 6*x - x^2)*(1 - 6*x - x^2)) + O(x^30))
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Colin Barker, Jan 26 2017
STATUS
approved