I would like to know how many choices of $x_i$ there are such that $\sum_{i=1}^{n}x_i^2=m$ where $n$, $m$ are given. The $x_i$ can be any nonnegative integer and need not be unique and the order is relevant. $k=\lfloor \sqrt{m} \rfloor$ is also given and may or may not be useful, I don't know. So basically I'm asking for the integer partition, but with square numbers instead of integers. The 'square partition', I presume?
An example: $n = 3, m =4$ has $3$ solutions, namely $x_1$ = 2, $x_2 = x_3 = 0$ and $2$ permutations. Another example $n = 4, m =4$ has $5$ solutions, namely $x_1$ = 2, $x_2 = x_3 = x_4 = 0$ and $3$ permutations and the solution $x_1 = x_2 = x_3 = x_4 = 1$.
If no exact solution exists, does someone know how to approximate this when $1 << n$ and $1 << m$?
Thank you