Find all positive integers $n<1000$ such that the cube of the sum of the digits of $n$ equals $n^{2}$.
$\mathrm{n}<1000$, so the sum of the digits is at most 27, so $\mathrm{n}^{2}$ is a cube not exceeding $27^{3}$. So we are looking for $\mathrm{m}^{3}$ which is also a square. That implies $\mathrm{m}$ is a square. So the only possibilities are $\mathrm{m}=1,4,9,16,25$. Giving $\mathrm{n}=1,8,27,64,125$. The corresponding cubes of the digit sums are $1,512,729,1000,512$, whereas the corresponding squares are $1,64,729,4096,15625$. Thus the only solutions are $\mathrm{n}=1,27$.