%I #16 Jan 28 2025 22:06:25
%S 225,361,625,900,1444,2500,3600,5776,10000,14400,23104,40000,57600,
%T 92416,160000,230400,369664,640000,921600,1478656,2560000,3686400
%N Squares that can be written as a sum of 3 distinct nonzero squares in exactly two ways.
%C k is a term if and only if 4*k is a term. Are 225, 361 and 625 the only terms not divisible by 4? - _Robert Israel_, Jan 28 2025
%p N:= 1000; # for squares up to N^2
%p V:= Vector(N):
%p for x from 1 to N-1 do
%p for y from 1 to x-1 while x^2 + y^2 < N^2 do
%p for z from 1 to y-1 do
%p s:= x^2 + y^2 + z^2;
%p if s > N^2 then break fi;
%p if issqr(s) then
%p v:= sqrt(s);
%p V[v]:= V[v]+1
%p fi
%p od od od:
%p map(`^`, select(t -> V[t]=2, [$1..N]),2); # _Robert Israel_, Jan 28 2025
%t t = Sort[Select[Flatten[Table[x^2 + y^2 + z^2, {x, 400}, {y, x + 1, 400}, {z, y + 1, 400}]], # < 160006 && IntegerQ[Sqrt[#]] &]];
%t f1[l_] := Module[{t = {}}, Do[If[l[[n]] != l[[n + 1]] && l[[n]] != l[[n - 1]], AppendTo[t, l[[n]]]], {n, Length[l] - 1}]; t];
%t f2[l_] := Module[{t = {}}, Do[If[l[[n]] == l[[n + 1]], AppendTo[t, l[[n]]]], {n, Length[l] - 1}]; t];
%t s1 = Join[{First[t]}, f1[t]];
%t Complement[t, s1];
%t t = f2[t];
%t s2 = Join[{First[t]}, f1[t]]
%Y Cf. A207638, A207639.
%K nonn,more
%O 1,1
%A _Vladimir Joseph Stephan Orlovsky_, Feb 19 2012
%E a(15)-a(22) from _Robert Israel_, Jan 28 2025