OFFSET
1,2
COMMENTS
Also values x of Pythagorean triples (x, x+23, y).
Corresponding values y of solutions (x, y) are in A156567.
For the generic case x^2 + (x + p)^2 = y^2 with p = m^2 - 2 a (prime) number in A028871, m>=5, the x values are given by the sequence defined by a(n) = 6*a(n-3) - a(n-6) + 2p with a(1)=0, a(2) = 2m + 2, a(3) = 3*m^2 - 10m + 8, a(4)=3p, a(5) = 3*m^2 + 10m + 8, a(6) = 20*m^2 - 58m + 42. Pairs (p, m) are (23, 5), (47, 7), (79, 9), (167, 13), (223, 15), (359, 19), (439, 21), (727, 27), (839, 29), ...
lim_{n -> infinity} a(n)/a(n-3) = 3 + 2*sqrt(2).
lim_{n -> infinity} a(n)/a(n-1) = (27 + 10*sqrt(2))/23 for n mod 3 = {1, 2}.
lim_{n -> infinity} a(n)/a(n-1) = (3 + 2*sqrt(2))/((27 + 10*sqrt(2))/23)^2 for n mod 3 = 0.
For the generic case x^2 + (x + p)^2=y^2 with p = m^2 - 2 a prime number in A028871, m>=5, Y values are given by the sequence defined by b(n) = 6*b(n-3) - b(n-6) with b(1) = p, b(2) = m^2 + 2m + 2, b(3) = 5m^2 - 14m + 10, b(4) = 5p, b(5) = 5m^2 + 14m + 10, b(6) = 29m^2 - 82m + 58. - Mohamed Bouhamida, Sep 09 2009
For the generic case x^2 + (x + p)^2 = y^2 with p = m^2 - 2 a prime number, m>=5, the first three consecutive solutions are: (0;p), (2m+2; m^2+2m+2), (3*m^2-10m+8; 5*m^2-14m+10) and the other solutions are defined by: (X(n); Y(n))= (3*X(n-3)+2*Y(n-3)+p; 4*X(n-3)+3*Y(n-3)+2p). - Mohamed Bouhamida, Aug 19 2019
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, Aug 20 2019
LINKS
G. C. Greubel, 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
a(n) = 6*a(n-3) - a(n-6) + 46 for n > 6; a(1)=0, a(2)=12, a(3)=33, a(4)=69, a(5)=133, a(6)=252.
G.f.: x*(12 + 21*x + 36*x^2 - 8*x^3 - 7*x^4 - 8*x^5)/((1-x)*(1 - 6*x^3 + x^6)).
MATHEMATICA
Select[Range[0, 100000], IntegerQ[Sqrt[#^2+(#+23)^2]]&] (* or *) LinearRecurrence[{1, 0, 6, -6, 0, -1, 1}, {0, 12, 33, 69, 133, 252, 460}, 50] (* Vladimir Joseph Stephan Orlovsky, Feb 02 2012 *)
PROG
(PARI) forstep(n=0, 1124000000, [1, 3], if(issquare(2*n*(n+23)+529), print1(n, ", ")))
(PARI) x='x+O('x^30); concat([0], Vec(x*(12+21*x+36*x^2-8*x^3-7*x^4-
8*x^5)/((1-x)*(1-6*x^3+x^6)))) \\ G. C. Greubel, May 04 2018
(Magma) I:=[0, 12, 33, 69, 133, 252, 460]; [n le 7 select I[n] else Self(n-1) +6*Self(n-3) -6*Self(n-4) -Self(n-6) +Self(n-7): n in [1..30]]; // G. C. Greubel, May 04 2018
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Mohamed Bouhamida, May 14 2006
EXTENSIONS
Edited by Klaus Brockhaus, Feb 10 2009
STATUS
approved