# (Binary) Theta functions and Atkin's U-operator

Let $D<0$ be a fundamental discriminant and consider the theta series $$\vartheta_Q(\tau)=\sum_{v\in\mathbb{Z}^2} q^{Q(v)}$$ associated to a quadratic form $Q$ of discriminant $D$. It appears to be true that $\vartheta_Q=\vartheta_Q|U(|D|)$, where $U$ is the usual Atkin U-operator, defined by its action on $q$-series $$\big(\sum_n a(n)q^n\big)|U(m):=\sum_n a(mn)q^n,$$ but I can't seem to find a proof of this. I strongly suspect that this is well-known (probably in much greater generality), but I'm not sure where to look. If anyone has a reference or of course a proof, that would be much appreciated!

I think you want to show that in each ideal class the number of ideals of norm a is equal to the number of ideals of norm $$a \cdot |D|$$. This should follow directly from the following 2 facts.
(1). All primes $$p$$ dividing $$|D|$$ ramify in the ring of integers of $$\mathbb{Q}(\sqrt{D})$$.
(2). The unique ideal of norm $$|D|$$ (uniqueness and existence follow from (1), taking a little care about the prime $$2$$) is principal, generated by $$\sqrt{D}$$.
In view of (1) and (2) the map $$J \rightarrow \sqrt{D} \cdot J$$ gives the desired bijection.