How many ordered triples of positive integers $(x,y,z) \in \mathbb{Z}^3_{>0}$ satisfy $x^2+y^2+z^2 = n$ for a given positive integer n?
This question is purely number-theoretic but originates from looking for the number of degeneracy in infinite cubical well given a certain energy level in quantum mechanics.
There are discussions in physics and chemistry communities as in Degeneracy for different energy states in Infinite cubic well, and A Particle in a Three-Dimensional Box. But the physicists and chemists didn't seem to solve the problem. I am here asking a favor from the math community to show your number theory skills.