Find all non-negative integers $n$ for which there exist integers $a$ and $b$ such that $n^{2}=a+b$ and $n^{3}=a^{2}+b^{2}$.
Due to the inequality of the arithmetic and geometric mean, applied to $a^{2}$ and $b^{2}$, it holds that $a^{2}+b^{2} \geq 2 a b$. Since $2 a b=(a+b)^{2}-\left(a^{2}+b^{2}\right)$, it follows that $n^{3} \geq\left(n^{2}\right)^{2}-n^{3}$, or equivalently $2 n^{3} \geq n^{4}$. This means $n=0$ or $2 \geq n$. Therefore, $n=0, n=1$ and $n=2$ are the only possibilities. For $n=0$ we find $a=b=0$ as a solution, for $n=1$ we find $a=0, b=1$ as a solution, and for $n=2$ we find $a=b=2$ as a solution. The numbers $n$ that satisfy this are thus precisely $n=0, n=1$ and $n=2$.