OFFSET
1,1
COMMENTS
The identity (5651522*n^2 - 8761372*n + 3395619)^2 - (1681*n^2 - 2606*n + 1010)*(137842*n - 106846)^2 = 1 can be written as A157112(n)^2 - A157110(n)*a(n)^2 = 1. - Vincenzo Librandi, Jan 25 2012
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..10000
Index entries for linear recurrences with constant coefficients, signature (2,-1).
FORMULA
a(n) = 2*a(n-1) - a(n-2). - Vincenzo Librandi, Jan 25 2012
G.f.: x*(106846*x + 30996)/(x-1)^2. - Vincenzo Librandi, Jan 25 2012
MATHEMATICA
LinearRecurrence[{2, -1}, {30996, 168838}, 40] (* Vincenzo Librandi, Jan 25 2012 *)
Table[137842 n-106846, {n, 30}] (* Harvey P. Dale, Dec 02 2024 *)
PROG
(PARI) a(n)=137842*n-106846 \\ Charles R Greathouse IV, Dec 28 2011
(Magma) I:=[30996, 168838]; [n le 2 select I[n] else 2*Self(n-1)-Self(n-2): n in [1..50]]; // Vincenzo Librandi, Jan 25 2012
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Vincenzo Librandi, Feb 23 2009
STATUS
approved