login
First of a triple of squares in arithmetic progression.
15

%I #36 Oct 20 2021 09:24:01

%S 1,4,49,9,49,16,289,196,25,1,36,196,529,49,961,441,64,1156,81,784,441,

%T 100,2401,289,121,2209,4,144,1225,529,169,784,2601,2116,5041,196,3844,

%U 1764,49,225,256,1681,1225,289,1681,2401,6241,9,4624,324,9409,361

%N First of a triple of squares in arithmetic progression.

%H Ray Chandler, <a href="/A198384/b198384.txt">Table of n, a(n) for n = 1..10000</a>

%H Keith Conrad, <a href="http://www.math.uconn.edu/~kconrad/blurbs/ugradnumthy/3squarearithprog.pdf">Arithmetic progressions of three squares</a>

%H Reinhard Zumkeller, <a href="/A198384/a198384_2.txt">Table of initial values</a>

%F a(n) = A198388(n)^2.

%F A198385(n) - a(n) = A198386(n) - A198385(n) = A198387(n).

%F A198435(n) = a(A198409(n)).

%t wmax = 1000;

%t triples[w_] := Reap[Module[{u, v}, For[u = 1, u < w, u++, If[IntegerQ[v = Sqrt[(u^2 + w^2)/2]], Sow[{u^2, v^2, w^2}]]]]][[2]];

%t Flatten[DeleteCases[triples /@ Range[wmax], {}], 2][[All, 1]] (* _Jean-François Alcover_, Oct 19 2021 *)

%o (Haskell)

%o a198384 n = a198384_list !! (n-1)

%o a198384_list = map (^ 2) a198388_list

%K nonn

%O 1,2

%A _Reinhard Zumkeller_, Oct 24 2011

%E Thanks to _Benoit Jubin_, who had the idea for sequences A198384 .. A198390 and A198435 .. A198441.