# The maximum number of perfect squares that can be in an arithmetic progression

What is the maximum number of perfect squares that can be in an arithmetic progression of positive integer terms of length $10$?

We can find five perfect squares in such a sequence: $$1,25,49,73,97,121,145,169,193,217.$$ I had a harder time finding $6$ perfect squares. Can we get an upper bound on the number of such perfect squares?

• Just for the sake of curiosity, can I see the sequence with 3 perfect squares? – RGS Nov 20 '16 at 22:30
• @RSerrao One example would be $1,25,49,\ldots$. – user19405892 Nov 20 '16 at 22:32
• @user19405892 That sequence has $5$, doesn't it? – Matthew Conroy Nov 21 '16 at 1:47
• @MatthewConroy Which sequence? – user19405892 Nov 21 '16 at 2:21
• @user19405892 1,25,49,73,97,121,145,169,193,217 has 5 squares. – Matthew Conroy Nov 21 '16 at 2:59

You may as well assume that the first term is a square. Suppose that

$$M, M + aD, M + bD, M + cD, M + dD$$

are equal to $v^2$, $w^2$, $x^2$, $y^2$, and $z^2$. Then one obtains a solution to the equations

$$\frac{w^2 - v^2}{a} = \frac{x^2 - v^2}{b} = \frac{y^2 - v^2}{c} = \frac{z^2 - v^2}{d}.$$

We are asking whether this has any solutions in integers $w,v,x,y,z$. Thinking of $[w;v;x;y;z] \in \mathbf{P}^4$, the equations above cut out a curve $C$ which is the intersection of three quadrics (the pairwise differences of the first term and the second, third, and fourth term). Assuming $a,b,c,d$ are distinct, the curve $C$ is smooth of has genus $5$, and hence has only finitely many rational points by Faltings' theorem. Hence there will only be finitely many arithmetic progressions (up to scaling) with at least $5$ squares.

On the other hand, I claim there are infinitely many arithmetic progressions (up to scaling) for which $M$, $M+D$, $M+2D$, and $M+4D$ are all squares. In this case, we obtain the equations:

$$w^2 - v^2 = \frac{x^2 - v^2}{2} = \frac{y^2 - v^2}{4}.$$

This is the intersection $X$ of two quadrics in $\mathbf{P}^3$, which defines a curve of genus one. The curve corresponding to $M$, $M+D$, $M+2D$, and $M+3D$ all being squares turns out not to have rational points (Fermat) but this one is an elliptic curve of rank one.

In fact, $X$ is (clearly) isogenous to

$$Y^2 = (1+X)(1+2X)(1+4X),$$

which is an elliptic curve of conductor $192$. If $P = [0,1]$, then the odd multiples of $P$ give rise to such sequences, e.g.:

$$P: M = 1, \quad D = 0,$$ $$3P: M = 49, \quad D = 120,$$ $$5P: M = 17497489, \quad D = -4269720,$$ $$7P: M = 4085374755361, \quad D = 82153503191760,$$ etc.

Summary: There will be infinitely many arithmetic progressions (even of length $5$) with $4$ squares, however, for any fixed length (say $10$, or $100$, or $1000$) there will only be finitely many arithmetic progressions up to scaling with at least $5$ squares.

To find the finitely many exceptions with $5$ or more squares could be a little bit annoying. For example, one could find all the rational points on the $\binom{9}{4}$ genus $5$ curves coming from assuming the first term and four more are all squares. Some of these will be duplicates by symmetry. It might first make sense to consider the $\binom{9}{3}$ genus one curves coming from assuming the first term and three more are all squares, see which ones have positive rank (although $P = [0,1]$ is a point on $Y^2 = (1+aX)(1+bX)(1+cX)$ and may well have infinite order unless $[a;b;c] = [1;2;3]$). If Michael Stoll is still around, he could probably come up with a complete answer. As far as I know, there may not be any with $5$ squares, although clearly this is false if one replaces $10$ (say) by $25$, since then $1,2,3,4,\ldots,25$ has $5$ squares. (This example also had me confused as to why you had a hard time finding an arithmetic progression with three squares, since $1,2,3,4,5,6,7,8,9,10$ does the job.)

The first upper bound (quite a naïve one) is 8.

Why?

Let me call a k-span to some $k$ elements of your arithmetic sequence that are consecutive and perfect squares.

Making use of the proof that there are no 4-spans, the biggest span we can have is 3. If we were to have as many 3-spans as possible, we could have 2 of them occupying positions $1-3$, $4-6$, and then we could have two more perfect squares over positions $9$ and $10$.

If our sequence has 9 perfect squares, it has at least a 5-span which is impossible.

So 8 perfect squares are on the table, provided they are separated on positions 4 and 8 or positions 3 and 7.

Can anyone get lower?

• 8 is impossible. Consider your 2 cases. If each $a+id$ is square for $i=1\dots 10$ except 4 & 8, the 5 odd $i$ give a 5-span. If each except $i=3$ & 7, the 5 even $i$ give a 5-span. – Rosie F Jun 1 '18 at 10:52