Proof of infinitude of primes using the irrationality of π
Solution 1:
The formula is described here (I am having a hard time finding a more authoritative reference); briefly, the OP's product in the usual product notation goes like
$$\frac{\pi}{4}=\prod_{k=2}^\infty \frac{p_k}{p_k-\chi(p_k)}$$
where $p_k$ is the $k$-th prime and $\chi(n)$ is a character defined as
$$\chi(n)=\begin{cases}1&\text{if }n\equiv 1\pmod 4\\-1&\text{if }n\equiv 3\pmod 4\end{cases}$$
As noted, the derivation is done by treating the usual Leibniz series
$$\frac{\pi}{4}=\sum_{k=1}^\infty \frac{(-1)^{k-1}}{2k-1}$$
as a Dirichlet series, and then expanding that series as an Euler product.
Edit: Daniel has given another nice link in the comments.