We'll prove it's true for all integers by induction (in the obvious extension way of the problem). Base case is easy. Suppose that for some $a_i$ we have $a_i=0$, then we get a problem isomorphic to our previous case, and so all the numbers will be integers in this case (qed). Suppose instead that our sequence of real numbers are all non-zero.
This forces $a_1=1$ and then we either have $a_2=2$ or $a_2=-1$ (as $a_2$ is not 0). Suppose $a_2=-1$ then henceforth we will have a problem isomorphic to the $n-2$ case which is true by induction, so if $a_2=-1$ then all the numbers are integers.
now it's kind of obvious what is happening because of the well known fact that $1^3+2^3+...+n^3=(1+2+...+n)^2$. Basically, whenever we look at the next number $a_(n+1)$ we see that the equation we get will always be a cubic so there are at most 3 roots. We see that the possible roots are:
$$a_{n+1}=0, a_{n+1}=-a_n, a_{n+1} = \text{(next number to satisfy)} 1^3+2^3+...+m^3=(1+2+...+m)^2$$
so by induction they must all be integers. it's not exactly a complete proof as how I would write it in a competition but here are the fundamental ideas.