%I #4 Mar 14 2022 17:31:20
%S 305,409,641,1189,2045,3541,6829,11861,20605,39785,69121,120089,
%T 231881,402865,699929,1351501,2348069,4079485,7877125,13685549,
%U 23776981,45911249,79765225,138582401,267590369,464905801,807717425,1559630965
%N Positive numbers y such that y^2 is of the form x^2+(x+409)^2 with integer x.
%C (-136, a(1)) and (A129641(n), a(n+1)) are solutions (x, y) to the Diophantine equation x^2+(x+409)^2 = y^2.
%C lim_{n -> infinity} a(n)/a(n-3) = 3+2*sqrt(2).
%C lim_{n -> infinity} a(n)/a(n-1) = (473+168*sqrt(2))/409 for n mod 3 = {0, 2}.
%C lim_{n -> infinity} a(n)/a(n-1) = (204819+83570*sqrt(2))/409^2 for n mod 3 = 1.
%H <a href="/index/Rec#order_06">Index entries for linear recurrences with constant coefficients</a>, signature (0,0,6,0,0,-1).
%F a(n) = 6*a(n-3)-a(n-6) for n > 6; a(1)=305, a(2)=409, a(3)=641, a(4)=1189, a(5)=2045, a(6)=3541.
%F G.f.: (1-x)*(305+714*x+1355*x^2+714*x^3+305*x^4) / (1-6*x^3+x^6).
%F a(3*k-1) = 409*A001653(k) for k >= 1.
%e (-136, a(1)) = (-136, 305) is a solution: (-136)^2+(-136+409)^2 = 18496+74529 = 93025 = 305^2.
%e (A129641(1), a(2)) = (0, 409) is a solution: 0^2+(0+409)^2 = 167281 = 409^2.
%e (A129641(3), a(4)) = (611, 1189) is a solution: 611^2+(611+409)^2 = 373321+1040400 = 1413721 = 1189^2.
%t LinearRecurrence[{0,0,6,0,0,-1},{305,409,641,1189,2045,3541},50] (* or *) Select[Table[Sqrt[x^2+(x+409)^2],{x,-140,10^6}],IntegerQ] (* The second program generates the first 16 terms of the sequence. To generate more, increase the x constant but the program may take a long time to run. *) (* _Harvey P. Dale_, Mar 14 2022 *)
%o (PARI) {forstep(n=-136, 10000000, [3, 1], if(issquare(2*n^2+818*n+167281, &k), print1(k, ",")))}
%Y Cf. A129641, A001653, A156035 (decimal expansion of 3+2*sqrt(2)), A160578 (decimal expansion of (473+168*sqrt(2))/409), A160579 (decimal expansion of (204819+83570*sqrt(2))/409^2).
%K nonn
%O 1,1
%A _Klaus Brockhaus_, Jun 08 2009