OFFSET
1,1
REFERENCES
R. K. Guy, Unsolved Problems in Number Theory, C20.
MATHEMATICA
n = 261;
a1 = Prime[Range[6]]^2; a2 = a3 = a4 = a5 = {};
Do[If[GCD[x, y] == 1, AppendTo[a2, x^2 + y^2]], {x, 0, (n/2)^(1/2)}, {y, x, (n - x^2)^(1/2)}];
Do[If[GCD[x, y] == GCD[x, z] == GCD[y, z] == 1, AppendTo[a3, x^2 + y^2 + z^2]], {x, 0, (n/3)^(1/2)}, {y, x, ((n - x^2)/2)^(1/2)}, {z, y, (n - x^2 - y^2)^(1/2)}];
Do[If[GCD[x, y] == GCD[x, z] == GCD[x, t] == GCD[y, z] == GCD[y, t] == GCD[z, t] == 1, AppendTo[a4, x^2 + y^2 + z^2 + t^2]], {x, 0, (n/4)^(1/2)}, {y, x, ((n - x^2)/3)^(1/2)}, {z, y, ((n - x^2 - y^2)/2)^(1/2)}, {t, z, (n - x^2 - y^2 - z^2)^(1/2)}];
Do[If[GCD[x, y] == GCD[x, z] == GCD[x, t] == GCD[x, w] == GCD[y, z] == GCD[y, t] == GCD[y, w] == GCD[z, t] == GCD[z, w] == GCD[t, w] == 1, AppendTo[a5, x^2 + y^2 + z^2 + t^2 + w^2]], {x, 0, (n/5)^(1/2)}, {y, x, ((n - x^2)/4)^(1/2)}, {z, y, ((n - x^2 - y^2)/3)^(1/2)}, {t, z, ((n - x^2 - y^2 - z^2)/2)^(1/2)}, {w, t, (n - x^2 - y^2 - z^2 - t^2)^(1/2)}];
Complement[Range[n], Union@Join[a1, a2, a3, a4, a5]]
CROSSREFS
KEYWORD
nonn
AUTHOR
XU Pingya, Jun 14 2020
STATUS
approved