You can prove a slightly stronger result: Any arithmetic progression with all terms distinct can have at most a finite number of consecutive terms both of which are squares.

Proof: If $d\not=0$ is the difference between consecutive terms and $a^2$ and $b^2$ are two consecutive terms that are both square, then $d=b^2-a^2=(b+a)(b-a)$. But any given integer $d$ has only finitely many factorizations, $d=rs$ (with $r$ and $s$ of the same parity). Setting $b+a=r$ and $b-a=s$ and solving for $a=(r-s)/2$ and $b=(r+s)/2$, we conclude there are only finitely many possibilities for $a^2$ and $b^2$.


You way looks fine to me, here's another way:

Suppose $d$ is the common difference in some arithmetic progression. Let $p$ be any prime other than $2$ that doesn't divide $d$. It's not hard to show that then the arithmetic progression hits every residue class mod $p$, but only $\frac{p+1}{2}$ of them are quadratic residues so they can't all be squares.


Yes, this is a very good way to prove it. It generalizes readily to higher powers and many other sequences. Other methods can give tighter bounds but may require more number theory, for instance:

  • The number of terms in an arithmetic progression that are $\le n$ is $\Theta(n)$ with constants depending on the specific progression, but the number of squares up to $n$ is only $O(\sqrt{n})$.

  • Pick $p$ to be the smallest odd prime that doesn't divide $d$ (this is at most $O(\log d)$ in size). Then one of the first $p$ terms will be a quadratic non-residue mod $p$.

  • Using an infinite descent argument, it can be shown that there is no AP of length 4 in the set of perfect squares. This was first observed by Fermat and can be shown by more modern methods, but the folklore of the elementary proof seems to have a bit of a history (see http://www.mathpages.com/home/kmath044/kmath044.htm as well as https://arxiv.org/abs/0712.3850).