When I compute the following expression to find integer solutions of the equation `(x^2 + y^2 + z^2 == 14^2)` Solve[x^2 + y^2 + z^2 == 14^2 && x > 0 && y > 0 && z > 0, {x, y, z}, Integers] Mathematica returns {{x -> 4, y -> 6, z -> 12}, {x -> 4, y -> 12, z -> 6}, {x -> 6, y -> 4, z -> 12}, {x -> 6, y -> 12, z -> 4}, {x -> 12, y -> 4, z -> 6}, {x -> 12, y -> 6, z -> 4}} which are permutations of the only solution: x=4, y=6, z=12. How can I remove other "solutions" by somehow merging the permutations? For me, x, y, and z are equivalent. ------- I don't want to do the following: First[Solve[x^2 + y^2 + z^2 == 14^2 && x > 0 && y > 0 && z > 0, {x, y, z}, Integers]] Because I will also solve: Solve[x^2 + y^2 + z^2 == 14^3 && x > 0 && y > 0 && z > 0, {x, y, z}, Integers] which has more than one solution.