I recently stumbled across the following statement. Let $d \in \mathbb{Z} \setminus \{0, 1\}$ be square free,
$$ D = \begin{cases} \phantom{-} 4d & d \equiv 2, 3 \text{ mod } 4 \\[4pt] \,\,\,\,\,d & d \equiv 1 \text{ mod } 4 \end{cases} $$ If $a, b, c \in \mathbb{Z}$ with $D = b^2 - 4ac$ then gcd($a, b, c$) $= 1$. Where does this come from? The gcd equality is written like something obvious, but I can't seem to figure it out. Any help is welcome.
Let $k = \gcd(a,b,c)$, with $a=kA, b=kB, c=kC$. Then $$D = b^2-4ac = k^2(B^2-4AC).$$ Since $d$ is square free, it follows that $k=1$ if $D = d$.
For the case $D = 4d$, it is possible that $k=2$, so that $d = B^2-4AC$. But then we have $d \equiv B^2 \pmod4$, which is impossible since $d \equiv 2 \text{ or } 3 \pmod 4$.