OFFSET
1,2
COMMENTS
Also values x of Pythagorean triples (x, x+31, y).
Corresponding values y of solutions (x, y) are in A157646.
For the generic case x^2 + (x + p)^2 = y^2 with p = 2*m^2 - 1 a (prime) number in A066436 see A118673 or A129836.
lim_{n -> infinity} a(n)/a(n-3) = 3 + 2*sqrt(2).
lim_{n -> infinity} a(n)/a(n-1) = (33 + 8*sqrt(2))/31 for n mod 3 = {1, 2}.
lim_{n -> infinity} a(n)/a(n-1) = (1539 + 850*sqrt(2))/31^2 for n mod 3 = 0.
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) + 62 for n > 6; a(1)=0, a(2)=9, a(3)=60, a(4)=93, a(5)=140, a(6)=429.
G.f.: x*(9 + 51*x + 33*x^2 - 7*x^3 - 17*x^4 - 7*x^5)/((1-x)*(1 - 6*x^3 + x^6)).
a(3*k + 1) = 31*A001652(k) for k >= 0.
MATHEMATICA
ClearAll[a]; Evaluate[Array[a, 6]] = {0, 9, 60, 93, 140, 429}; a[n_] := a[n] = 6*a[n-3] - a[n-6] + 62; Table[a[n], {n, 1, 31}] (* Jean-François Alcover, Dec 27 2011, after given formula *)
LinearRecurrence[{1, 0, 6, -6, 0, -1, 1}, {0, 9, 60, 93, 140, 429, 620}, 50] (* G. C. Greubel, Mar 31 2018 *)
PROG
(PARI) {forstep(n=0, 850000000, [1, 3], if(issquare(2*n^2+62*n+961), print1(n, ", ")))};
(Magma) I:=[0, 9, 60, 93, 140, 429, 620]; [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..50]]; // G. C. Greubel, Mar 31 2018
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Mohamed Bouhamida, May 19 2006
EXTENSIONS
Edited by Klaus Brockhaus, Mar 11 2009
STATUS
approved