If an arithmetic progression contains a perfect square, then it must contain a perfect square strictly less than ... (Question): If an arithmetic progression of positive integers $a, a+d, a+2d, \dots$ contains a perfect square, then it must contain a perfect square strictly less than $a+2d\sqrt{a}+d^2$.
I noticed that
\begin{equation}
(m-d)^2=m^2-d(2m-d)
\end{equation}
But I have no clue on how to prove the "strictly less" part. Thank you in advance for your comment/answer!
 A: I assume the arithmetic progression is non-degenerate, i.e., $d \neq 0$. Also, since the progression is of positive integers, then $a \gt 0$ and $d \gt 0$.
Let $a + kd$, for some integer $k \ge 0$, be the smallest element of the progression which is a perfect square. Thus, there's a positive integer $e$ such that
$$a + kd = e^2 \tag{1}\label{eq1A}$$
You're asking to prove
$$e^2 \lt a + 2d\sqrt{a} + d^2 \tag{2}\label{eq2A}$$
As Joffan's question comment states, the right side is equivalent to $(\sqrt{a} + d)^2$. Thus, \eqref{eq2A} is equivalent to trying to prove
$$e \lt \sqrt{a} + d \tag{3}\label{eq3A}$$
Assume, instead, that
$$e \ge \sqrt{a} + d \implies e - d \ge \sqrt{a} \implies (e - d)^2 \ge a \tag{4}\label{eq4A}$$
Note, though, that
$$\begin{equation}\begin{aligned}
(e - d)^2 & = e^2 - 2ed + d^2 \\
& = (a + kd) - 2ed + d^2 \\
& = a + (k - 2e + d)d
\end{aligned}\end{equation}\tag{5}\label{eq5A}$$
This is also a perfect square smaller than $e^2$ (due to $e \gt e - d \gt 0$ using \eqref{eq4A}), and of the form $a + jd$ for an integer $j = k - 2e + d$, so it's a member of the arithmetic progression if $j \ge 0$. However, since $e^2$ is the smallest perfect square which is a member of the progression, this means $(e - d)^2$ cannot be a member, so this requires $j \lt 0$ and
$$(e - d)^2 \lt a \tag{6}\label{eq6A}$$
Note this contradicts \eqref{eq4A}, so the assumption it is correct is false. This means \eqref{eq3A} and, thus, \eqref{eq2A}, must be true instead.
