%I #30 Mar 22 2019 08:58:58
%S 31,34,36,37,39,43,45,47,49,50,54,57,61,68,69,71,74,77,81,83,86,94,
%T 107,113,116,131,136,144,149,200,216,272,296,344,376,464,544,576,800,
%U 864,1088,1184,1376,1504,1856,2176,2304,3200,3456,4352,4736,5504,6016,7424
%N Numbers that are the sum of 4 nonzero squares in exactly 2 ways.
%C Conjecture: the even members of this sequence are all numbers of the form
%C k*4^m for k in [9,17,29], m>= 1, or k*4^m for k in [34, 50, 54, 74, 86, 94], m>=0. - _Robert Israel_, Nov 03 2017
%H Alois P. Heinz, <a href="/A025358/b025358.txt">Table of n, a(n) for n = 1..77</a> (first 71 terms from Robert Price)
%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/SquareNumber.html">Square Number</a>
%H <a href="/index/Su#ssq">Index entries for sequences related to sums of squares</a>
%F {n: A025428(n) = 2}. - _R. J. Mathar_, Jun 15 2018
%p N:= 10000: # to get all terms <= N
%p T:= Vector(N):
%p for a from 1 to floor(sqrt(N/4)) do
%p for b from a to floor(sqrt((N-a^2)/3)) do
%p for c from b to floor(sqrt((N-a^2-b^2)/2)) do
%p for d from c to floor(sqrt(N-a^2-b^2-c^2)) do
%p m:= a^2+b^2+c^2+d^2;
%p T[m]:= T[m]+1;
%p od od od od:
%p select(i -> T[i] = 2, [$1..N]); # _Robert Israel_, Nov 03 2017
%t M = 1000;
%t Clear[T]; T[_] = 0;
%t For[a = 1, a <= Floor[Sqrt[M/4]], a++,
%t For[b = a, b <= Floor[Sqrt[(M - a^2)/3]], b++,
%t For[c = b, c <= Floor[Sqrt[(M - a^2 - b^2)/2]], c++,
%t For[d = c, d <= Floor[Sqrt[M - a^2 - b^2 - c^2]], d++,
%t m = a^2 + b^2 + c^2 + d^2;
%t T[m] = T[m] + 1;
%t ]]]];
%t Select[Range[M], T[#] == 2&] (* _Jean-François Alcover_, Mar 22 2019, after _Robert Israel_ *)
%Y Cf. A025367 (at least 2 ways).
%K nonn
%O 1,1
%A _David W. Wilson_
|