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 - a(n)*A157111(n)^2 = 1. - Vincenzo Librandi, Jan 25 2012
The continued fraction expansion of sqrt(a(n)) is [41n-32; {4, 1, 1, 4, 82n-64}]. - Magus K. Chu, Oct 03 2022
From Klaus Purath, Apr 18 2025: (Start)
a(n)*41^2-1 is a square, and a(n) is the sum of two squares (see FORMULA). There are no squares in this sequence. The odd prime factors of these terms are always of the form 4*k + 1.
All a(n) = D satisfy the Pell equation (k*x)^2 - D*(41*y)^2 = -1 for any integer n where a(1-n) = A157010(n). The values for k and the solutions x, y can be calculated using the following algorithm: k = sqrt(D*41^2 - 1), x(0) = 1, x(1) = 4*D*41^2 - 1, y(0) = 1, y(1) = 4*D*41^2 - 3. The two recurrences are of the form (4*D*41^2 - 2, -1).
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..10000
Vincenzo Librandi, X^2-AY^2=1 [Broken link]
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). - Vincenzo Librandi, Jan 25 2012
G.f.: x*(-85 - 2267*x - 1010*x^2)/(x-1)^3. - Vincenzo Librandi, Jan 25 2012
From Klaus Purath, Apr 18 2025: (Start)
a(n) = (9*n - 7)^2 + (40*n - 31)^2 for any integer n.
1681*a(n) - 1 = (1681*n - 1303)^2 for any integer n. (End)
MATHEMATICA
LinearRecurrence[{3, -3, 1}, {85, 2522, 8321}, 40] (* Vincenzo Librandi, Jan 25 2012 *)
Table[1681*n^2-2606*n+1010, {n, 40}] (* Harvey P. Dale, Nov 24 2024 *)
PROG
(Magma) I:=[85, 2522, 8321]; [n le 3 select I[n] else 3*Self(n-1)-3*Self(n-2)+1*Self(n-3): n in [1..40]]; // Vincenzo Librandi, Jan 25 2012
(PARI) for(n=1, 22, print1(1681*n^2 - 2606*n + 1010", ")); \\ Vincenzo Librandi, Jan 25 2012
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Vincenzo Librandi, Feb 23 2009
STATUS
approved
