login
Numbers which squared are a sum of 3 distinct nonzero squares.
6

%I #12 Sep 19 2020 12:40:46

%S 7,9,11,13,14,15,17,18,19,21,22,23,25,26,27,28,29,30,31,33,34,35,36,

%T 37,38,39,41,42,43,44,45,46,47,49,50,51,52,53,54,55,56,57,58,59,60,61,

%U 62,63,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,81,82,83,84,85,86,87

%N Numbers which squared are a sum of 3 distinct nonzero squares.

%C Square roots of squares in A004432. - _R. J. Mathar_, Sep 22 2009

%H David A. Corneth, <a href="/A161992/b161992.txt">Table of n, a(n) for n = 1..10000</a>

%e 7^2 = 2^2 + 3^2 + 6^2. 9^2 = 1^2 + 4^2 + 8^2. 11^2 = 2^2 + 6^2 + 9^2. 15^2 = 2^2 + 5^2 + 14^2.

%p isA004432 := proc(n) local x,y,z2 ; for x from 1 do if x^2 > n then break; fi; for y from 1 to x-1 do z2 := n-x^2-y^2 ; if z2 < y^2 and z2 > 0 then if issqr(z2) then RETURN(true) ; fi; fi; od: od: false ; end:

%p isA161992 := proc(n) isA004432(n^2) ; end:

%p for n from 1 do if isA161992(n) then printf("%d\n",n) ; fi; od: # _R. J. Mathar_, Sep 22 2009

%t lst={};Do[Do[Do[a=(x^2+y^2+z^2)^(1/2);If[a==IntegerPart[a],AppendTo[lst, a]],{z,y+1,2*5!}],{y,x+1,2*5!}],{x,5!}];lst;q=Take[Union[%],150]

%o (PARI) is(n) = n>>=valuation(n, 2); n > 5 \\ _David A. Corneth_, Sep 18 2020

%Y Cf. A004432, A029747.

%K nonn

%O 1,1

%A _Vladimir Joseph Stephan Orlovsky_, Jun 24 2009

%E Definition rephrased by _R. J. Mathar_, Sep 22 2009