OFFSET
0,1
COMMENTS
REFERENCES
Edward J. Barbeau, Pell's Equation, New York: Springer-Verlag, 2003, p. 52, Exercise 4.9.
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (6,-1).
FORMULA
a(n) = (-sqrt(2)*(1+sqrt(2))^(2*n+1) - 3 *(1-sqrt(2))^(2*n+1) - sqrt(2)*(1-sqrt(2))^(2*n+1) + 3*(1+sqrt(2))^(2*n+1))/sqrt(8).
a(n) = 2 * A038723(n).
G.f.: 2*(1-2*x) / (1-6*x+x^2). - Colin Barker, Dec 31 2015
E.g.f.: exp(3*x)*(4*cosh(2*sqrt(2)*x) + sqrt(2)*sinh(2*sqrt(2)*x))/2. - Stefano Spezia, Nov 30 2025
MATHEMATICA
LinearRecurrence[{6, -1}, {2, 8}, 70] (* Vincenzo Librandi, Dec 31 2015 *)
Table[SeriesCoefficient[2 (1 - 2 x)/(1 - 6 x + x^2), {x, 0, n}], {n, 0, 22}] (* Michael De Vlieger, Dec 31 2015 *)
PROG
(Magma) I:=[2, 8]; [n le 2 select I[n] else 6*Self(n-1)-Self(n-2): n in [1..70]]; // Vincenzo Librandi, Dec 31 2015
(PARI) Vec(2*(1-2*x)/(1-6*x+x^2) + O(x^30)) \\ Colin Barker, Dec 31 2015
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Raphie Frank, Dec 30 2015
STATUS
approved
