on lattice vectors $M={\left(\begin{smallmatrix} a & \lambda \\ \lambda' & b\end{smallmatrix}\right) }\in L$ of norm $ab-\lambda\lambda'\in p{\mathbb{Z}}$ divisible by $p$ by $$\begin{aligned}
\label{eq:psi}
\psi(M)=\begin{cases}
 (\tfrac{a}{p}),& \text{if $p\nmid a$,}\\
 (\tfrac{b}{p}),& \text{if $p\nmid b$,}\\
0,&\text{if $p\mid (a,b)$.}
            \end{cases}\end{aligned}$$ The following lemma shows that $\psi$ is well defined.

Let $M={\left(\begin{smallmatrix} a & \lambda \\ \lambda' & b\end{smallmatrix}\right) }\in L$ be a $p$-primitive vector (i.e. $\frac{1}{p}M\notin L$) and assume that $ab-\lambda\lambda'=np$ for some $n\in {\mathbb{Z}}$. Then $(\tfrac{a}{p})+(\tfrac{b}{p})\neq 0$.

First we notice that the hypothesis implies $p\nmid (a,b)$. This immediately yields the assertion if $p\mid a$, or $p\mid b$, respectively. So we may assume that $p\nmid a$ and $p\nmid b$. We have to show that $(\tfrac{a}{p})=(\tfrac{b}{p})$. If we write $\lambda=\frac{1}{2}(c+d\sqrt{p})$ with $c,d\in
{\mathbb{Z}}$ we find that $$\begin{aligned}
4ab=c^2-pd^2+4np\equiv \alpha^2\pmod{p}.\end{aligned}$$ This implies the assertion.

The function $\psi$ has the following genus character interpretation. Assume that $M={\left(\begin{smallmatrix} a & \lambda \\ \lambda' & b\end{smallmatrix}\right) }\in L$ and $ab-\lambda\lambda'\in p{\mathbb{Z}}$. Then $\lambda$ actually belongs to ${\mathcal{O}}_F$ and we may write $\lambda=\frac{1}{2}(c+d\sqrt{p})$ with $c,d\in
{\mathbb{Z}}$. We have $$\begin{aligned}
\label{quadform}
{\begin{pmatrix} a & \lambda \\ \lambda' & b \end{pmatrix}}\equiv {\begin{pmatrix} a & c/2 \\ c/2 & b \end{pmatrix}}\pmod{\partial_F}\end{aligned}$$ and the latter matrix defines a binary integral quadratic form $Q=[a,c,b]$ of 