PowersRepresentations[n,k,p] gives the distinct representations of the integer
n as a sum of
p-th integer powers"
How does Mathematica do this computation so quickly? Is there a fast algorithm? What is it?
I am particularly interested in the case where $n$ is the sum of $k$ squares of positive integers.