[Math] There cannot be an infinite AP of perfect squares.

arithmetic-progressionselementary-number-theorynumber theoryproof-verification

I could not find any existing questions on this site stating this problem. Therefore I am posting my solution and I ask for other ways to prove this theorem too.

The Question

Prove that there cannot be an infinite integer arithmetic progression of distinct terms all of which are perfect squares.

My attempt

We shall prove it using contradiction. First off, there are a couple of things to notice which greatly simplify our discussion:

  1. The AP cannot be decreasing as eventually, the terms will be negative and perfect squares are non-negative.
  2. There has to be a non-zero, positive difference between the terms otherwise the terms would not be distinct.

Let us therefore, assume an AP with the first term $a$ – a non-negative integer and the positive difference $d$. The $i$th term of the AP is $T_i=a+(i-1)d$.

The AP is increasing, therefore there is a term $T_n$ for the least value of $n$ such that $T_n\geq d^2$. Now, $T_{n+1}$ is also a perfect square. Let $T_{n+1}=b^2$. Therefore, we have
$$
d^2 \leq b^2 \implies d \leq b
$$

Therefore we have
$$
T_{n+1}=b^2+d<b^2+2b+1=(b+1)^2
$$
or
$$b^2 < T_{n+1} < (b+1)^2$$

However, there are no perfect squares between two consecutive perfect squares. This contradicts our supposition that every term is a perfect square and an integer at the same time. Therefore, no such arithmetic progression exists.

Best Answer

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$.