OFFSET
1,1
COMMENTS
LINKS
EXAMPLE
14 is a term since 14 = 1^2+2^2+3^2.
38 is a term since 38 = 2^2+3^2+5^2 (note that 38 is also 1^2+1^2+6^2, but that is not a contradiction since here i=j).
MAPLE
N:= 10^4; # to get all terms <= N
S:= Vector(N):
for a from 1 to floor(sqrt(N/3)) do
for b from a+1 to floor(sqrt((N-a^2)/2)) do
c:= [$(b+1) .. floor(sqrt(N-a^2-b^2))]:
v:= map(t -> a^2 + b^2 + t^2, c):
S[v]:= map(`+`, S[v], 1)
od od:
select(t -> S[t]=1, [$1..N]); # Robert Israel, Jan 03 2016
MATHEMATICA
Select[Range[200], (pr = PowersRepresentations[#, 3, 2]; Length[Select[pr, Union[#] == # && #[[1]] > 0&]] == 1)&] (* Jean-François Alcover, Feb 27 2019 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
STATUS
approved