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?
Best Answer
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.)