Solve, I can find the solutions to $$ w + x + y + z = 0. $$ where $(w,x,y,z)$ are all integers between $-n$ and $n$.
This gives me all solutions, including ones which are identical up to permutation, i.e. $(1,0,1,-2)$ and $(0,1,-2,1)$. But I would like to consider these both to be the same solution.
DeleteDuplicates it's easy enough to get the unique solutions (up to permutations), but both of these steps use up much more time than just generating non-duplicate solutions in the first place.
My questions is: is there a way to generate non-duplicate solutions, and efficiently?