Let's determine 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}$.
Solution. Using the conditions:

$$
n^{4}=\left(n^{2}\right)^{2}=(a+b)^{2}=a^{2}+b^{2}+2 a b=n^{3}+2 a b
$$

thus $2 a b=n^{4}-n^{3}$. Therefore,

$$
0 \leq(a-b)^{2}=a^{2}+b^{2}-2 a b=n^{3}-\left(n^{4}-n^{3}\right)=n^{3}(2-n)
$$

from which $n \leq 2$. If $n=0$, then $a=b=0$, if $n=1$, then $a=1, b=0$, and if $n=2$, then $a=b=2$ is a valid choice. Therefore, the value of $n$ can be 0, 1, or 2.