Let $f = 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$). We suppose $D$ is not a square integer. Let $m$ be an integer. If $m = ax^2 + bxy + cy^2$ has a solution in $\mathbb{Z}^2$, we say $m$ is represented by $f$. Let $p$ be an odd prime divisor of $D$. By this question, $\left(\frac{m}{p}\right)$ does not depend on the choice of $m$. So it is natural to ask what can be said for the prime 2 if $D \equiv 0$ (mod $4$).
We define a map $\psi_1:\mathbb{Z} \rightarrow \mathbb{C}$ as follows.
If $r$ is even, $\psi_1(r) = 0$.
If $r$ is odd, $\psi_1(r) = (-1)^{(r-1)/2}$.
We define a map $\psi_2:\mathbb{Z} \rightarrow \mathbb{C}$ as follows.
If $r$ is even, $\psi_2(r) = 0$.
If $r$ is odd, $\psi_2(r) = (-1)^{(r^2 - 1)/8}$.
By this question, $\{1, \psi_1, \psi_2, \psi_1\psi_2\}$ are the set of Dirichlet characters modulo $8$.
Let $p$ be an odd prime number. We define a map $\chi_p:\mathbb{Z} \rightarrow \mathbb{C}$ by $\chi_p(m) = \left(\frac{m}{p}\right)$. We call $\chi_p$ the quadratic residue character modulo $p$.
Let $D$ be a non-square integer such that $D \equiv 0$ (mod $4$) or $D \equiv 1$ (mod $4$). Let $\{p_1, p_2, . . . , p_r\}$ be the set of odd prime divisors of $D$. We allocate a finite sequence of elements of $\{\chi_{p_1},\dots,\chi_{p_r},\psi_1, \psi_2, \psi_1\psi_2\}$ to each of the following cases as follows.
1) $D ≡ 1$ (mod $4$): $\chi_{p_1},\dots,\chi_{p_r}$
2) $D ≡ 0$ (mod $4$) and $D/4\equiv 0$ (mod $8$): $\chi_{p_1},\dots,\chi_{p_r}, \psi_1, \psi_2$
3) $D ≡ 0$ (mod $4$) and $D/4\equiv 1, 5$ (mod $8$): $\chi_{p_1},\dots,\chi_{p_r}$
4) $D ≡ 0$ (mod $4$) and $D/4\equiv 2$ (mod $8$): $\chi_{p_1},\dots,\chi_{p_r}, \psi_2$
5) $D ≡ 0$ (mod $4$) and $D/4\equiv 3, 4, 7$ (mod $8$): $\chi_{p_1},\dots,\chi_{p_r}, \psi_1$
6) $D ≡ 0$ (mod $4$) and $D/4\equiv 6$ (mod $8$): $\chi_{p_1},\dots,\chi_{p_r}, \psi_1\psi_2$
We call each of these sequences the system of genus characters of discriminant $D$.
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$). Let $\Phi_1,\dots,\Phi_{\mu}$ be the system of genus characters of discriminant $D$. Let $f = ax^2 + bxy + cy^2$ be a primitive binary quadratic form of discriminant $D$. If $D < 0$, we assume $a > 0$. By this question, there exists an integer $m$ which is represented by $f$ and gcd($m, D) = 1$. Then $\Phi_1(m),\dots,\Phi_{\mu}(m)$ do not depend on the choice of $m$.
Remark The notion of the system of genus characters is due to Gauss(Disquisitiones Arithmeticae, art.230).