Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

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.

share|improve this question
Have you seen this and this? For the sum of squares case, see this. –  J. M. 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

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.