Question: Let $a, b, c$ be positive integers and $p>3$ be a prime ($ a$ isn't divisible by $p$). Consider a quadratic polynomial $P(x) = ax^2+bx+c$, and assume that there exists $2 p-1$ consecutive positive integers: $$x+1, x+2, ..., x+2p-1$$ satisfying that $P(x+i)$ is a square number for every $i$ $(1 \leq i \leq 2p-1)$. Is it true that the number $\Delta = b^2-4ac$ is divisible by $p$ ?
I found out that if there exists $i$ in which $1 \leq i \leq p-1$ so that $P(x+i)$ is divisible by $p$, then $\Delta$ is divisible by not only $p$, but $p^2$ as well.
If $P(x+i)$ is divisible by $p$, then $p^2|P(x+i)$ and $p^2|P(x+i+p)$, thus $$p^2|P(x+i+p)-P(x+i) \implies p^2|p(a(2x+2i+p)+b) \implies p|2a(x+i)+b$$ and since $4a\cdot P(x+i)=(2a(x+i)+b)^2-\Delta$, so $p^2|\Delta$.
However I cannot find any conditions of $a, b, c, p$ so that there exists $i$ in which $1 \leq i \leq p-1$ and $p|P(x+i)$. Is the question correct or there must be some conditions of $a, b, c, p$ for the question to to be true?
(Sorry, English is my second language)
The answer is yes, and I will assume that you are familiar with modular arithmetic. First write $$(2a)^2P(k)=a((2ak+b)^2-(b^2-4ac)),$$ and note that $2ak+b$ ranges over all residue classes modulo $p$ as $k$ ranges from $x+1$ to $x+2p-1$, because $p$ doesn't divide $a$. It follows that $(2ak+b)^2$ ranges over all quadratic residues modulo $p$.
Given that $P(k)$ is a square for all $k$ ranging from $x+1$ to $x+2p-1$, and that the map on residue classes mod $p$ $$(\Bbb{Z}/p\Bbb{Z})\ \longrightarrow\ (\Bbb{Z}/p\Bbb{Z}): n\ \longmapsto a(n-\Delta),$$ is bijective, again because $p$ does not divide $a$, we see that this map restricts to a bijection on the quadratic residues modulo $p$. In particular $P(k)\equiv0\pmod{p}$ for some $k\in\{x+1,\ldots,x+2p-1\}$, from which point your argument works.
From this point, one could also note that there are more quadratic residues than quadratic nonresidues. Depending on whether $a$ is a quadratic residue or not, the map $$(\Bbb{Z}/p\Bbb{Z})\ \longrightarrow\ (\Bbb{Z}/p\Bbb{Z}): n\ \longmapsto n-\Delta,$$ either maps all quadratic residues to quadratic residues, or maps all quadratic residues to quadratic nonresidues. As this is a bijection, the latter is impossible and so $a$ is a quadratic residue. Moreover, if $\Delta\not\equiv0\pmod{p}$ then repeated application of the map above implies that all residue classes modulo $p$ are quadratic residues, contradicting the fact that $p>3$. Hence $\Delta\equiv0\pmod{p}$, i.e. $b^2-4ac$ is divisible by $p$.
Note that for this argument to work, it suffices for only $p$ consecutive integers to exist such that $P(x+1)$ through $P(x+p)$ are squares. Or even more weakly, but less elegantly, for $P$ to take on a square value at least once in each residue class modulo $p$.