Given a nonnegative integer $d$, what is the length $L$ of longest squarefree arithmetic progression with difference $d$?
Conjecture: $L = p^2 - 1$, where $p$ is the smallest prime not dividing $d$.
It is easy to see that $L \leq p^2 - 1$ (consider the progressions $(n, n+d, ... , n+p^2\cdot d)$ modulo $p^2$). For all $d<=200$ and for many other values of $d$ I have checked that the inequality is in fact an equality.
For example, if $d = 30030 = 2\cdot3\cdot5\cdot7\cdot11\cdot13$, then $p = 17$ and the progression with difference $d$ starting at $n=108349$ and having length $p^2-1 = 288$ consists of squarefree numbers.The "framing" numbers of this sequence, $n-d = 17^2\cdot271$ and $n+288\cdot d=17^2\cdot30301$, both contain the square of $p$. Also,there is no squarefree arithmetic progression for this $d$ starting at a smaller $n$.
Can one prove or disprove my conjecture?