# The discriminant of an integral binary quadratic form and the discriminant of a quadratic number field

Let $ax^2 + bxy + cy^2$ be a binary quadratic form over $\mathbb{Z}$. Let $D = b^2 - 4ac$ be its discriminant. It is easy to see that $D \equiv 0$ (mod $4$) or $D \equiv 1$ (mod $4$).

Conversely suppose $D$ is a non-square integer such that $D \equiv 0$ (mod $4$) or $D \equiv 1$ (mod $4$). Then there exists an integral binary quadratic form of discriminant $D$(see this question).

Is the following proposition true? If yes, how do we prove it?

Proposition Let $D$ be a non-square integer such that $D \equiv 0$ (mod $4$) or $D \equiv 1$ (mod $4$). Then $D$ can be written uniquely as $D = f^2 d$, where $f$ is a positive integer and $d$ is the discriminant of a quadratic number field.

-