discriminant $c^2-4ab$ divisible by $p$. Recall that on binary integral quadratic forms of discriminant divisible by $p$ we have a genus character $\chi_p$ which is defined as follows: $$\chi_p(Q)=\begin{cases} (\frac{n}{p}),& \text{if $p\nmid Q$ and $(n,p)=1$ and $Q$ represents $n$},\\
0,& \text{if $p\mid Q$.}
      \end{cases}$$ This definition does not depend on the choice of $n$. If the quadratic form $Q$ corresponds to $M$ as in , then $\psi(M)=\chi_p(Q)$.

One easily verifies that the value of $\psi(M)$ only depends on the $\Gamma$-orbit of $M$. In fact, it is well known that the components of $F_{mp^2}$ are distinguished by the values of the function $\psi$ (see [@Za2], [@Ge] Chapter V.3).

For a positive integer $m$ we define the twisted Hirzebruch-Zagier divisor of index $m$ by $$\begin{aligned}
\label{def: tildetm}
\tilde T_m = \sum_{\substack{M\in L/\{\pm 1\}\\
\det(M)=mp}} \psi(M)\cdot M^\perp.\end{aligned}$$

For instance, if $m$ is square-free then $\tilde T_m  = F_{mp^2}^+-F_{mp^2}^-$.

Automorphic Green functions {#sect:4}
===========================

Let $m$ be a positive integer. Following [@Br1] we define the automorphic Green function corresponding to $\tilde T_m$ by $$\begin{aligned}
\tilde \Phi_{mp^2}(z_1,z_2,s)=
\sum_{\substack{{\left(\begin{smallmatrix} a & \lambda \\ \lambda' & b\end{smallmatrix}\right) } \in L\\
ab-{\operatorname{N}}(\lambda)=mp}} \psi{\left(\begin{smallmatrix} a & \lambda \\ \lambda' & b\end{smallmatrix}\right) } Q_{s-1}\left(1+\frac{ |az_1
z_2 +\lambda z_1+\lambda' z_2+b|^2}{ 2y_1 