OFFSET
1,2
COMMENTS
Also values x of Pythagorean triples (x, x+41, y).
Corresponding values y of solutions (x, y) are in A157257.
lim_{n -> infinity} a(n)/a(n-3) = 3 + 2*sqrt(2).
lim_{n -> infinity} a(n)/a(n-1) = (7 + 2*sqrt(2))/(7 - 2*sqrt(2)) for n mod 3 = {1, 2}.
lim_{n -> infinity} a(n)/a(n-1) = (3 + 2*sqrt(2))*(7 - 2*sqrt(2))^2/(7 + 2*sqrt(2))^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) + 82 for n > 6; a(1)=0, a(2)=36, a(3)=39, a(4)=123, a(5)=319, a(6)=336.
G.f.: x*(36 + 3*x + 84*x^2 - 20*x^3 - x^4 - 20*x^5)/((1-x)*(1 - 6*x^3 + x^6)).
a(3*k + 1) = 41*A001652(k) for k >= 0.
MATHEMATICA
LinearRecurrence[{1, 0, 6, -6, 0, -1, 1}, {0, 36, 39, 123, 319, 336, 820}, 40] (* Harvey P. Dale, Jan 18 2015 *)
PROG
(PARI) forstep(n=0, 1200000000, [3 , 1], if(issquare(2*n^2+82*n+1681), print1(n, ", ")))
(Magma) m:=25; R<x>:=PowerSeriesRing(Integers(), m); [0] cat Coefficients(R!(x*(36+3*x+84*x^2-20*x^3-x^4-20*x^5)/((1-x)*(1-6*x^3+ x^6)))); // G. C. Greubel, May 07 2018
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Mohamed Bouhamida, May 26 2007
EXTENSIONS
Edited and extended by Klaus Brockhaus, Feb 26 2009
STATUS
approved