of $K_i$, and $\mu(K_i)$ is the group of roots of unity of $K_i$, acting diagonally (we view ${{\mathbb C}}$ as the infinite completion of $K_i$). The existence and the uniqueness of $\chi_i$ are then verified in each case by a straightforward calculation (compare \[L1\]).

For the second part, the vanishing of $a_p(h_i)$ for $p$ inert in $K_i$ is a general property of CM forms. For a split $p$ (prime to $\text{cond}(h_i)$), write $p = a^2 + d_i b^2 =
\text{Nm}^{K_i}_{{{\mathbb Q}}} \pi$. Here $\pi$ is a prime element of ${{\mathcal O}}_{K_i}$, so $a$ and $b$ are half integers. We verify that, up to multiplying $\pi$ by a unit, we can guarantee that $a$ and $b$ are integers for $i=8$. In all cases, the $a$’s and the $b$’s are unique up to signs. Next one verifies that $\pi\equiv \pm 1
\pmod{c_i{{\mathcal O}}_{K_i}}$. Let $\wp$ be the ideal generated by $\pi$ (notice that changing the sign of $b$ replaces $\wp$ by its conjugate). Let ${\operatorname{tr}}$ denote the trace from $K_i$ to ${{\mathbb Q}}$. By the general theory, we have that $$a_p(h_i) = {\operatorname{tr}}\chi_\wp(\pi) =
{\operatorname{tr}}\chi_\infty(\pi)^{-1} = {\operatorname{tr}}\pi^2 =
2(a^2-d_ib^2),$$ where the second equality holds since the finite components of $\chi$ other than 