# PowersRepresentations Algorithm

I'm trying to understand the mathematics behind counting the number of representations of a positive integer by $n$ distinct $k$th powers, i.e. I would really like to know how to do the Mathematica function PowersRepresentations by hand. Any explanations, references, even special cases (I'm particularly interested in $k=2$) would be appreciated. Thanks.

-
Have you seen this and this? For the sum of squares case, see this. –  Guess who it is. Oct 11 '12 at 2:30
I feel like this is more a mathematics question, than it is a Mathematica one. Or do you specifically want to know how Mathematica is calculating power represantations? –  jens_bo Oct 11 '12 at 4:45