login
Square root of third term of a triple of squares in arithmetic progression.
8

%I #34 Oct 20 2021 10:21:55

%S 7,14,17,21,23,28,31,34,35,41,42,46,47,49,49,51,56,62,63,68,69,70,71,

%T 73,77,79,82,84,85,89,91,92,93,94,97,98,98,102,103,105,112,113,115,

%U 119,119,119,119,123,124,126,127,133,136,137,138,140,141,142,146

%N Square root of third term of a triple of squares in arithmetic progression.

%C There is a connection to the leg sums of Pythagorean triangles.

%C See a comment on the primitive case under A198439, which applies mutatis mutandis. - _Wolfdieter Lang_, May 23 2013

%C Are these just the positive multiples of A001132? - _Charles R Greathouse IV_, May 28 2013

%C n appears A331671(n) times. - _Ray Chandler_, Feb 26 2020

%H Ray Chandler, <a href="/A198390/b198390.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 A198386(n) = a(n)^2.

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

%e Connection to leg sums of Pythagorean triangles: a(2) = 14 because (in the notation of the Zumkeller link) (u,v,w)= (2,10,14) = 2*(1,5,7), and this corresponds to the non-primitive Pythagorean triangle 2*(x=(7-1)/1,y=(1+7)/2,z=5) = 2*(3,4,5) with leg sum 2*(3+4) = 14. - _Wolfdieter Lang_, May 23 2013

%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, v, w}]]]]][[2]];

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

%o (Haskell)

%o a198390 n = a198390_list !! (n-1)

%o a198390_list = map (\(_,_,x) -> x) ts where

%o ts = [(u,v,w) | w <- [1..], v <- [1..w-1], u <- [1..v-1],

%o w^2 - v^2 == v^2 - u^2]

%o (PARI) is(n)=my(t=n^2);forstep(i=2-n%2,n-2,2, if(issquare((t+i^2)/2), return(1))); 0 \\ _Charles R Greathouse IV_, May 28 2013

%Y Cf. A198386, A198409, A198439, A198441, A331671.

%K nonn

%O 1,1

%A _Reinhard Zumkeller_, Oct 24 2011