There is an interesting (and documented) number-theoretic function in MMA called PowersRepresentations[$n$, $k$, $p$].
It gives the distinct representations of the integer $n$ as a sum of $k$ non-negative $p$-th integer powers.
I recently heard about related undocumented function
How can I find out more on that undocumented function (number of arguments etc.)? What does it do exactly? How does it relate to
PowersRepresentations, esp. performance-wise? Is there
The only place on the Internet known to me where this function is mentioned and used is @kglr answer to a question on this site.