11

While verifying the claim of another post, I found experimental evidences suggesting the curious formula relating $\pi$ and primes. Let $P$ be the set of prime and $p \in P$. I observed that $$ \frac{\pi}{4} = \prod_{p \equiv 1 \bmod 4} \frac{p}{p-1} \prod_{p \equiv 3 \bmod 4} \frac{p}{p+1} \tag 1 $$

where the products run over the set of all primes. User @Lukas Heger commented that the above identify is indeed true and is Euler product for the L-function attached to the unique primitive Dirichlet character of modulus $4$. Later I found in Wikipedia that this was a classical result due to Euler himself. Define

$$ f(n) = \prod_{r < n \atop p \in P} \left(\prod_{p \equiv r \bmod 2n} \frac{p}{p-1}\right) \cdot \prod_{r > n \atop p \in P} \left(\prod_{p \equiv r \bmod 2n} \frac{p}{p+1}\right).\tag 2 $$

where the product is taken over all primes $p$. Then Euler's formula can be expressed as $\displaystyle f(2) = \frac{\pi}{4}$. The same Wikipedia article also gives $\displaystyle f(3) = \frac{\sqrt{3}\pi}{6}$. Upon further explorations, I found a few more possible identities based on computation up to the first $6.4 \times 10^9$ primes, with the results agreeing up to five or more decimal places. The data shows that

$$ f(4) = \frac{\pi}{\sqrt{2}}, \text{ } f(6) = \pi, \text{ } f(10) = \frac{\sqrt{5}\pi}{2} $$

However $f(5)$ and $f(8)$ does not seem to have a closed form expression.

Question 1: For what $n$ does $f(n)$ has a closed form expression and what is this closed form?

Moreover for the same value of $n$, alternating the $\pm$ in the denominators produces other algebraic multiples of $\pi$. For example, for $n=6$

$$ \frac{\pi}{3} = \prod_{p \equiv 1 \bmod 12 \atop p \in P} \frac{p}{p-1} \prod_{p \equiv 5 \bmod 12 \atop p \in P} \frac{p}{p-1} \prod_{p \equiv 7 \bmod 12 \atop p \in P} \frac{p}{p+1} \prod_{p \equiv 11 \bmod 12 \atop p \in P} \frac{p}{p+1} \tag 3 $$

$$ \frac{\pi}{3} = \prod_{p \equiv 1 \bmod 12 \atop p \in P} \frac{p}{p+1} \prod_{p \equiv 5 \bmod 12 \atop p \in P} \frac{p}{p+1} \prod_{p \equiv 7 \bmod 12 \atop p \in P} \frac{p}{p-1} \prod_{p \equiv 11 \bmod 12 \atop p \in P} \frac{p}{p-1} \tag 4 $$

$$ \frac{\pi}{2\sqrt{3}} = \prod_{p \equiv 1 \bmod 12 \atop p \in P} \frac{p}{p-1} \prod_{p \equiv 5 \bmod 12 \atop p \in P} \frac{p}{p+1} \prod_{p \equiv 7 \bmod 12 \atop p \in P} \frac{p}{p-1} \prod_{p \equiv 11 \bmod 12 \atop p \in P} \frac{p}{p+1} \tag 5 $$

$$ \frac{2\pi}{3\sqrt{3}} = \prod_{p \equiv 1 \bmod 12 \atop p \in P} \frac{p}{p+1} \prod_{p \equiv 5 \bmod 12 \atop p \in P} \frac{p}{p-1} \prod_{p \equiv 7 \bmod 12 \atop p \in P} \frac{p}{p+1} \prod_{p \equiv 11 \bmod 12 \atop p \in P} \frac{p}{p-1} \tag 6 $$

Trivially when we change the order, there must be a equal number of terms with $p-1$ and $p+1$ in the denominators otherwise the product will diverge to infinity or converge to zero. I observed, in case of non-alternative orders, $$ \prod_{p \equiv 1 \bmod 12 \atop p \in P} \frac{p}{p-1} \prod_{p \equiv 5 \bmod 12 \atop p \in P} \frac{p}{p+1} \prod_{p \equiv 7 \bmod 12 \atop p \in P} \frac{p}{p+1} \prod_{p \equiv 11 \bmod 12 \atop p \in P} \frac{p}{p-1} \tag 7 $$ and $$ \prod_{p \equiv 1 \bmod 12 \atop p \in P} \frac{p}{p+1} \prod_{p \equiv 5 \bmod 12 \atop p \in P} \frac{p}{p-1} \prod_{p \equiv 7 \bmod 12 \atop p \in P} \frac{p}{p-1} \prod_{p \equiv 11 \bmod 12 \atop p \in P} \frac{p}{p+1} \tag 8 $$ do not seem to have such a closed form.

Question 2: For what order of the terms $p-1$ and $p+1$ in the denominators does such a closed form exist?

  • Any idea what happens for $n = 8$? – Michael Lugo Aug 29 '24 at 18:25
  • 1
    @MichaelLugo The product for the first $9.1 \times 10^8$ primes is $4.029226312481008$. This agrees with $\frac{\pi^2}{\sqrt{6}} = 4.029249$ to four decimal places. But this is unlikely to be true since the product has been pretty flat $4.02922$ for a long time and seems unlikely that it will rise to $4.029249$. Most probably, there is some other algebraic multiple of $\pi$. – Nilotpal Sinha Aug 29 '24 at 18:33
  • 2
    Also for $n = 12$, preliminary calculations suggests that the product is $\displaystyle \sqrt{\frac{3}{2}}\pi$ – Nilotpal Sinha Aug 29 '24 at 18:44
  • 2
    The inverse symbolic calculator doesn't return anything for your value for $n=8$. It may well be an exception. – Eric Snyder Aug 29 '24 at 20:38
  • 1
    As stated in the previous post, those products are divergent. $\prod_{p \equiv 1 \bmod 4} \frac{p}{p-1}$ is divergent and $\prod_{p \equiv 3 \bmod 4} \frac{p}{p+1}$ is divergent. The limit $$\lim_{x\to\infty} \prod_{p \equiv 1 \bmod 4,\ p\le x} \frac{p}{p-1} \prod_{p \equiv 3 \bmod 4,\ p\le x} \frac{p}{p+1}$$ however converge, and you should at least mention that you're considering such limits. – jjagmath Aug 29 '24 at 21:41
  • @jjagmath Isn't the limit obvious form the fact that the product is taken over the set of all prime i.e. $p \in P$? – Nilotpal Sinha Aug 29 '24 at 21:52
  • 1
    @NilotpalSinha The point is that when you write $\prod_{p \equiv 1 \bmod 4} \frac{p}{p-1} \prod_{p \equiv 3 \bmod 4} \frac{p}{p+1}$ you are writing the product of two divergent products, which is meaningless. That's like saying $$\sum_{k=1}^\infty \frac{1}{k} - \sum_{k=1}^\infty \frac{1}{k} = 0$$ which is obviously wrong. But if you write $$\lim_{n\to\infty}\left(\sum_{k=1}^n \frac{1}{k} - \sum_{k=1}^n \frac{1}{k}\right) = 0$$ that's ok. – jjagmath Aug 29 '24 at 22:14
  • 1
    Here I present an Euler product for $\pi/\sqrt5$. It matches $f(10)$ except the factors fir the "ramified" primes $2,5$ are not included. – Oscar Lanzi Sep 07 '24 at 18:08

1 Answers1

1

You can render a value for $f(n)$ whenever $n=2q$ is twice an odd prime, provided that you use signs in $p\pm1$ that conform with the Legendre symbol modulo $q$ and quadratic character of a prime modulo $4$. Calling this version $g(n)$ we have:

$g(n)=\prod\limits_{p\in\mathbb{P}}\dfrac{p}{p-\chi(p)(p|q)}$

where

$\chi(p)=0(p=2),1(p\equiv1\bmod4),-1(p\equiv3\bmod4)$

$(p|q)=\text{ Legendre symbol of residue } p\bmod q$

So for $n=10=2×5$ we would have

$g(10)=\prod\limits_{p\in\mathbb{P}}\dfrac{p}{p-\chi(p)(p|5)}$

$=(\frac32)(\frac76)(\frac{11}{12})(\frac{13}{14})(\frac{17}{18})...=\pi/\sqrt5$

Note that this formulation has no factor for $p=2$ because $\chi(2)=0$, nor for $p=5$ because $(5|5)=0$. But otherwise, for this particular argument $n=10$, all the signs in the $p/(p\pm1)$ factors match up with your $f(n)$ definition.

Now try $n=14=2×7$. Among residues $\bmod28$ that are prime to $28$ we have

$\chi(1)=1,(1|7)=1\implies p/(p-1)$

$\chi(3)=-1,(3|7)=-1\implies p/(p-1)$

but

$\chi(5)=1,(5|7)=-1\implies p/(p+1),$

and so to get a value involving $\pi$ for $n=14$ we can't just use $p/(p-1)$ for all residues less than $14\bmod28$ or $p/(p+1)$ for all residues greater than $14\bmod 28$. Using the $\chi$ and Legendre symbol values defined above we find that properly, $p/(p-1)$ applies to residues $1,3,9,19,25,27\bmod28$ and $p/(p+1)$ applies to residues $5,11,13,15,17,23\bmod28$. We can then find

$g(14)=(\frac32)(\frac56)(\frac{11}{12})(\frac{13}{14})(\frac{17}{18})(\frac{19}{18})...=\pi/(2\sqrt7)$

Oscar Lanzi
  • 48,208
  • I wanted to be more concrete, explicitly showing a case whrre the signs are not completely separated as the $f$ definition proposed. – Oscar Lanzi Sep 07 '24 at 19:21