%I #66 Dec 26 2021 20:56:05
%S 14,21,26,29,30,35,38,41,42,45,46,49,50,53,54,56,59,61,62,65,66,69,70,
%T 74,75,77,78,81,83,84,86,89,90,91,93,94,98,101,104,105,106,107,109,
%U 110,113,114,115,116,117,118,120,121,122,125,126,129,131,133
%N Numbers that are the sum of 3 distinct nonzero squares.
%C Numbers that can be written as a(n) = x^2 + y^2 + z^2 with 0 < x < y < z.
%C This is a subsequence (equal to the range) of A024803. As a set, it is the union of A025339 and A024804, subsequences of numbers having exactly one, resp. more than one, such representations. - _M. F. Hasler_, Jan 25 2013
%C Conjecture: a number n is a sum of 3 squares, but not a sum of 3 distinct nonzero squares (i.e., is in A004432 but not A000408), if and only if it is of the form 4^j*s, where j >= 0 and s in {1, 2, 3, 5, 6, 9, 10, 11, 13, 17, 18, 19, 22, 25, 27, 33, 34, 37, 43, 51, 57, 58, 67, 73, 82, 85, 97, 99, 102, 123, 130, 163, 177, 187, 193, 267, 627, 697}. - _Jeffrey Shallit_, Jan 15 2017
%C 4*a(n) gives the sums of 3 distinct nonzero even squares. - _Wesley Ivan Hurt_, Apr 05 2021
%H T. D. Noe, <a href="/A004432/b004432.txt">Table of n, a(n) for n = 1..10000</a>
%H <a href="/index/Su#ssq">Index entries for sequences related to sums of squares</a>
%F A004432 = { x^2 + y^2 + z^2; 0 < x < y < z }.
%F n is in A004432 <=> A025442(n) > 0. - _M. F. Hasler_, Feb 03 2013
%e 14 = 1^2 + 2^2 + 3^2;
%e 62 = 1^2 + 5^2 + 6^2.
%t f[upto_]:=Module[{max=Floor[Sqrt[upto]]},Select[Union[Total/@ (Subsets[ Range[ max],{3}]^2)],#<=upto&]]; f[150] (* _Harvey P. Dale_, Mar 24 2011 *)
%o (PARI) is_A004432(n)=for(x=1,sqrtint(n\3),for(y=x+1,sqrtint((n-1-x^2)\2),issquare(n-x^2-y^2)&return(1))) \\ _M. F. Hasler_, Feb 02 2013
%o (Haskell)
%o a004432 n = a004432_list !! (n-1)
%o a004432_list = filter (p 3 $ tail a000290_list) [1..] where
%o p k (q:qs) m = k == 0 && m == 0 ||
%o q <= m && k >= 0 && (p (k - 1) qs (m - q) || p k qs m)
%o -- _Reinhard Zumkeller_, Apr 22 2013
%Y Cf. A001974, A024803, A025339, A025442.
%Y Cf. A000290, A003995, A004431, A004433, A004434, A224981, A224982, A224983.
%K nonn,easy,nice
%O 1,1
%A _N. J. A. Sloane_
|