OFFSET
1,2
COMMENTS
For the generic case x^2 + (x + p)^2 = y^2 with p = 2*m^2 - 49 a (prime) number, m >= 12 (p >= 239), the first three consecutive solutions are (0, p), (14*m+49, 2*m^2+14*m+49), (6*m^2-70*m+196, 10*m^2-98*m+245), the subsequent solutions are defined by the following recurrence relation: (X(n), Y(n)) = (3*X(n-3) + 2*Y(n-3) + p, 4*X(n-3) + 3*Y(n-3) + 2*p), X(n) = 6*X(n-3) - X(n-6) + 2*p, and Y(n) = 6*Y(n-3) - Y(n-6) (can be easily proved using X(n) = 3*X(n-3) + 2*Y(n-3) + p, and Y(n) = 4*X(n-3) + 3*Y(n-3) + 2*p). - Mohamed Bouhamida, Jun 18 2026
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..1000
Index entries for linear recurrences with constant coefficients, signature (1,0,6,-6,0,-1,1).
FORMULA
G.f.: x^2*(119*x^5+x^4+119*x^3-497*x^2-3*x-217)/((x-1)*(x^6-6*x^3+1)). - Colin Barker, Aug 05 2012
EXAMPLE
For p=239 (m=12) the first three consecutive solutions are (0, 239), (217, 505), (220, 509).
MATHEMATICA
LinearRecurrence[{1, 0, 6, -6, 0, -1, 1}, {0, 217, 220, 717, 1900, 1917, 4780}, 70]
CROSSREFS
KEYWORD
nonn,easy,changed
AUTHOR
Vladimir Joseph Stephan Orlovsky, Feb 09 2012
STATUS
approved
