# $\frac{\pi}{4} = \frac{3}{4} \times \frac{5}{4} \times \frac{7}{8} \times \frac{11}{12} \times \cdots$ (just primes in the numerator)

How to prove the following equality?

$$\frac{\pi}{4} = \frac{3}{4} \times \frac{5}{4} \times \frac{7}{8} \times \frac{11}{12} \times \frac{13}{12} \times \frac{17}{16} \times \frac{19}{20} \times \frac{23}{24} \times \frac{29}{28} \times \frac{31}{32} \times \cdots$$

I've seen this formula on Wikipedia.

The numerators are the odd primes; each denominator is the multiple of four nearest to the numerator.

Thanks.

• Perhaps I'm missing something obvious, but how are you determining the denominators? – QtizedQ Jun 24 '13 at 22:30
• It looks like it's $d = p \pm 1$ such that $d \mod 4 = 0$. – nbubis Jun 24 '13 at 22:31
• It looks very much like this question. – Start wearing purple Jun 24 '13 at 22:33
• @PeterTamaroff It is very close and can be solved using the same techniques but the identity itself is not the same. In my link, it was $p\pm1$ if $p\equiv\pm1\mod 4$ (note the sign difference). For example, in that identity $31$ would be divided by $30$, not by $32$. – Start wearing purple Jun 24 '13 at 23:19
• This is evaluating the $L$-function of the nontrivial character mod 4 at $s = 1$ through its Euler product, which is a lot more subtle to justify than evaluating the series for that $L$-function at $s = 1$. – KCd Jun 25 '13 at 0:29

As I mentioned in my comment yesterday, this question is very similar to this one, except that here we want to prove the identity \begin{align*} \dfrac{\pi}{4}=\prod_{k=2}^{\infty}\left(1+\dfrac{(-1)^{\frac{p_{{k}}+1}{2}}}{p_{k}} \right )^{-1}, \end{align*} which turns out to be even simpler. So I almost literally reproduce the relevant half of my previous solution:

1. Decompose the product on the right as $$B=\prod_{\text{primes}\; p\\ \text{ of the form }4k+1}\left(1-\frac{1}{p}\right)^{-1}\prod_{\text{primes}\; p\\ \text{ of the form }4k+3}\left(1+\frac{1}{p}\right)^{-1}.\tag{1}$$

2. Consider an odd integer $n=2m+1$. It is easy to understand that if primes of the form $4k+3$ appear in its prime number decomposition an even number of times, then $n$ is of the form $4K+1$ [since $(4k_1+3)(4k_2+3)=1\; \mathrm{mod}\;4$]. If the number of such appearances is odd, then $n$ is of the form $4K+3$.

3. Rewrite (1) (expanding its factors into geometric series) as $$B=\sum_{m=0}^{\infty}\frac{(-1)^{r(m)}}{2m+1}$$ where $r(m)$ counts the number of appearances of primes of the form $4k+3$ in the decomposition of $2m+1$. But then Step 2 allows to write $(-1)^{r(m)}=(-1)^m$, so that $$B=\sum_{m=0}^{\infty}\frac{(-1)^{m}}{2m+1}=\frac{\pi}{4}.$$

Your product is nothing but $$\lim_{n \to \infty}\prod_{\overset{p_k \leq n}{p_k \equiv -1 \pmod4}} \left(1+\dfrac1{p_k}\right)^{-1} \prod_{\overset{p_k \leq n}{p_k \equiv 1 \pmod4}} \left(1-\dfrac1{p_k}\right)^{-1}$$ Now recall that $$\left(1-\dfrac1r\right)^{-1} = \sum_{k=0}^{\infty} \dfrac1{r^k}$$ Make use of the above to note that $$\lim_{n \to \infty}\prod_{\overset{p_k \leq n}{p_k \equiv -1 \pmod4}} \left(1+\dfrac1{p_k}\right)^{-1} \prod_{\overset{p_k \leq n}{p_k \equiv 1 \pmod4}} \left(1-\dfrac1{p_k}\right)^{-1} = \lim_{m \to \infty} \sum_{\ell=0}^m \dfrac{(-1)^\ell}{2\ell+1} = \dfrac{\pi}4$$ The last step makes use of the fact that $$4\ell+1 = \prod_{\overset{q_k \equiv 1 \pmod4}{k=1,2,\ldots,n_1}} q_k^{a_k} \prod_{\overset{p_j \equiv -1 \pmod4}{j=1,2,\ldots,n_2}} p_j^{b_j}$$ such that $\displaystyle \sum_{j=1}^{n_2}b_j = \text{even}$ and $$4\ell-1 = \prod_{\overset{q_k \equiv 1 \pmod4}{k=1,2,\ldots,n_1}} q_k^{a_k} \prod_{\overset{p_j \equiv -1 \pmod4}{j=1,2,\ldots,n_2}} p_j^{b_j}$$ such that $\displaystyle \sum_{j=1}^{n_2}b_j = \text{odd}$.

• Care to elucidate on the derivation of the final line? – nbubis Jun 25 '13 at 3:06
• @nbubis I have updated the post clarifying the last line. – user17762 Jun 25 '13 at 3:28
• The main thing to note is $$(1 \pm 1/p)^{-1} = 1 \mp 1/p + 1/p^2 \mp 1/p^3 + \cdots$$ If you multiply out the product, you can see each odd number $x$ appears exactly once in the form $1/x$ (with an appropriate sign). (the prime factorization of $x$ tells you which term to take from each factor to make $1/x$) – user14972 Jun 25 '13 at 3:37

Let $L(s,\chi)$ be the $L$ function for the non principal modulo $4$ Dirichlet character

$$\frac{\pi}{4}=L(1,\chi)=\prod_{p}\frac{p}{p-\chi(p)}=\prod_{p\equiv 1 \text{mod 4}}\frac{p}{p-1}\prod_{p\equiv 3 \text{mod 4}}\frac{p}{p+1}$$