= Solution
Write an integral <binary quadratic form> as $Q(u,v)=Au^2+Buv+Cv^2$, with <discriminant of a binary quadratic form> $d=B^2-4AC$. If $Q(u,v)=p$ is <prime>, then $\gcd(u,v)=1$: any common <divisor> would have its square dividing $p$. Complete $(u,v)$ to a matrix in $\operatorname{SL}_2(\mathbb Z)$ using <Bezout identity>. After the associated integral <change of variables>, the properly equivalent form has leading coefficient $p$, say $[p,b,c]$. Its <discriminant of a binary quadratic form> gives $d=b^2-4pc$, hence $b^2\equiv d\pmod p$.
Conversely suppose $b_0^2\equiv d\pmod p$. Since $d$ is an integral-form <discriminant of a binary quadratic form>, $d\equiv0$ or $1\pmod4$. Choose $b\equiv b_0\pmod p$ with even <integer parity> for $d\equiv0\pmod4$ and odd <integer parity> for $d\equiv1\pmod4$. This is possible because $p$ is odd. Then $b^2-d$ is divisible by $4p$, and
$$
\boxed{Q(u,v)=pu^2+buv+\frac{b^2-d}{4p}v^2}
$$
is an integral form of <discriminant of a binary quadratic form> $d$ representing $p=Q(1,0)$. This proves the <discriminant criterion for prime representation by a binary quadratic form>, including the case $p\mid d$; no assumption that $d$ is a <fundamental discriminant> was used.
Back to article page