You are right to question this. The product $\prod_p \left(1 - \chi(p)/p\right)^{-1}$ (where $\chi = (-1/\cdot)$ is the Dirichlet character mod $4$) does converge, but that requires justification; indeed it is equivalent to the non-vanishing of the Dirichlet function $L(s,\chi)$ on the edge $s = 1+it$ of the critical strip, which is also what you need to prove the analogue of the Prime Number Theorem for primes in arithmetic progressions mod $4$. (Taking logarithms we see that the desired convergence is equivalent to convergence of the sum $\sum_p \chi(p)/p$, which differs from the product's logarithm by an absolutely convergent sum $\sum_p O(1/p^2)$, and from that to $L(s,\chi)$ is classical analytic number theory.)
Noam D. Elkies
- 79.9k
- 15
- 281
- 376