OFFSET
1,1
COMMENTS
The identity (2401*n^2-3822*n+1520)^2-(49*n^2-78*n+31)*( 343*n-273)^2=1 can be written as A157370(n)^2-a(n)*A157369(n)^2=1.
The continued fraction expansion of sqrt(a(n)) is [7n-6; {2, 2, 1, 7n-7, 1, 2, 2, 14n-12}]. For n=1, this collapses to [1; {2}]. - Magus K. Chu, Sep 06 2022
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..10000
Vincenzo Librandi, X^2-AY^2=1
Index entries for linear recurrences with constant coefficients, signature (3,-3,1).
FORMULA
a(n) = 3*a(n-1) -3*a(n-2) +a(n-3).
G.f: x*(-2-65*x-31*x^2)/(x-1)^3.
E.g.f.: (31 - 29*x + 49*x^2)*exp(x) - 31. - G. C. Greubel, Feb 02 2018
MATHEMATICA
LinearRecurrence[{3, -3, 1}, {2, 71, 238}, 40]
PROG
(Magma) I:=[2, 71, 238]; [n le 3 select I[n] else 3*Self(n-1)-3*Self(n-2)+1*Self(n-3): n in [1..40]];
(PARI) a(n) = 49*n^2 - 78*n + 31.
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Vincenzo Librandi, Feb 28 2009
STATUS
approved