I watched a video that said the probability for Gaussian integers to be relatively prime is an expression in $\pi$, and I also know about $\zeta(2) = \pi^2/6$ but I am wondering what are more connections between $\pi$ and prime numbers?

12$\begingroup$ You can use the fact that zeta(2)=pi^2/6 to prove the infinitude of primes. If there were finitely many, then the Euler product for zeta(2) would be a rational number, contradicting the irrationality of pi. $\endgroup$– user1073Mar 3, 2010 at 19:54

21$\begingroup$ This question should in my opinion be Community Wiki. $\endgroup$– GMRAMar 3, 2010 at 20:56

4$\begingroup$ More generally, for all positive integers $n$, $\zeta(2n)$ is a rational multiple of $\pi^{2n}$. $\endgroup$– Gerry MyersonMar 3, 2010 at 22:42

3$\begingroup$ See also this related question  mathoverflow.net/questions/21367/… $\endgroup$– François G. DoraisJun 19, 2010 at 14:52

1$\begingroup$ It shows up when one considers the infinite prime together with the usual primes: mathoverflow.net/q/7656/733 $\endgroup$– Peter ArndtMay 29, 2014 at 16:12
8 Answers
Well, first of all, $\pi$ is not just a random real number. Almost every real number is transcendental so how can we make the notion "$\pi$ is special" (in a numbertheoretical sense) more precise?
Start by noticing that $$\pi=\int_{\infty}^{\infty}\frac{dx}{1+x^2}$$ This already tells us that $\pi$ has something to do with rational numbers. It can be expressed as "a complex number whose real and imaginary parts are values of absolutely convergent integrals of rational functions with rational coefficients, over domains in $\mathbb{R}^n$ given by polynomial inequalities with rational coefficients." Such numbers are called periods. Coming back to the identity $$\zeta(2)=\frac{\pi^2}{6}$$ There is a very nice proof of this (that at first seems very unnatural) due to Calabi. It shows that $$\frac{3\zeta(2)}{4}=\int_0^1\int_0^1\frac{dx\,dy}{1x^2y^2}$$ by expanding the corresponding geometric series, and then evaluates the integral to $\pi^2/8$. (So yes, $\pi^2$ and all other powers of $\pi$ are periods.) But the story doesn't end here as it is believed that there are truly deep connections between values of zeta functions (or Lfunctions) and certain evaluations involving periods, such as $\pi$. Another famous problem about primes is Sylvester's problem of which primes can be written as a sum of two rational cubes. So one studies the elliptic curve $$E_p: p=x^3+y^3$$ and one wants to know if there is one rational solution, the central value of the corresponding Lfunction will again involve $\pi$ up to some integer factor and some Gamma factor. Next, periods are also values of multiple zeta functions: $$\zeta(s_1,s_2,\dots,s_k)=\sum_{n_1>n_2>\cdots>n_k\geq 1}\frac{1}{n_1^{s_1}\cdots n_k^{s_k}}$$ And they also appear in other very important conjectures such as the Birch and SwinnertonDyer conjecture. But of course all of this is really hard to explain without using appropriate terminology, the language of motives etc. So, though, this answer doesn't mean much, it's trying to show that there is an answer to your question out there, and if you study a lot of modern number theory, it might just be satisfactory :).
Leonard Euler discovered many years ago that
$\frac π 4 = \frac 3 4 \cdot \frac 5 4 \cdot \frac 7 8 \cdot \frac {11} {12} \cdot \frac {13} {12} \cdots$
where the numerators on the righthand side are the odd prime numbers and each denominator (on both sides) is the multiple of 4 nearest to the corresponding numerator. Pretty fascinating if you ask me.

1$\begingroup$ So $\pi = \infty$, or what do you want to say?  Your series diverges ... . $\endgroup$– Stefan Kohl ♦Jul 21, 2013 at 23:00

2$\begingroup$ Replace addition with multiplication, the infinte series should be an infinte product. $\endgroup$ Jul 21, 2013 at 23:30

1$\begingroup$ mathworld.wolfram.com/PrimeProducts.html, formula (33) $\endgroup$ Jul 21, 2013 at 23:53

8

$\begingroup$ Agreed, this is truely fascinating. And atan(1) = pi/4 so maybe some connection? $\endgroup$ Jan 9, 2020 at 4:49
The probability that two Gaussian integers are relatively prime is $6/(\pi^2 K) = 0.66370080461385348\cdots$, where $K= 1  \frac{1}{3^2}+\frac{1}{5^2}\frac{1}{7^2}+\cdots$ (Catalan's constant). There is no known simple expression for $K$ in terms of $\pi$. See Link.
Here is an example of a way to use $\pi$ to prove the infinitude of primes without calculating its value, or using the relatively deep fact that $\pi$ is irrational, but starting from the knowledge of $\zeta(2)$ and $\zeta(4).$ Suppose that there were only finitely many prime numbers $ 2= p_{1}, 3= p_{2}, \ldots, p_{k1},p_{k}.$ From the formulae $\sum_{n=1}^{\infty} \frac{1}{n^{2}} = \frac{\pi^{2}}{6}$ and $\sum_{n=1}^{\infty} \frac{1}{n^{4}} = \frac{\pi^{4}}{90}$, we may conclude after the fashion of Euler that (respectively) we have: $\prod_{j=1}^{k} \frac{p_{j}^{2}}{p_{j}^{2}1} = \frac{\pi^{2}}{6}$' and $\prod_{j=1}^{k} \frac{p_{j}^{4}}{p_{j}^{4}1} = \frac{\pi^{4}}{90}.$ Squaring the first equation and dividing by the second leads quickly to $\prod_{j=1}^{k} \frac{p_{j}^{2}+1}{p_{j}^{2}1} = \frac{5}{2}$, so $5\prod_{j=1}^{k} (p_{j}^{2}1) = 2 \prod_{j=1}^{k}(p_{j}^{2}+1).$ This is a contradiction, since the product on the left is certainly divisible by $3$, whereas every term in the rightmost product except that for $j = 2$ is congruent to $1$ (mod 3), so we obtain $0 \equiv (1)^{k}$ (mod 3), which is absurd. (I would be grateful if anyone knows a reference for a proof like this. I can't believe that I am the first person to think of it).

$\begingroup$ Neat. Is there an easier way to see that $\zeta(4)/\zeta(2) = 5/2$? $\endgroup$ Mar 16, 2013 at 0:18

$\begingroup$ @Francois: I do not know. I think that there are quite a few instances in number theory where computations which eventually have a rational answer require $\pi$ in an apparently essential fashion along the way. $\endgroup$ Mar 16, 2013 at 1:01

1$\begingroup$ @Geoff: Another way of seeing this: $\sum_{(a,b)=1} \frac{1}{a^2b^2}=\frac{5}{2}$. $\endgroup$ Mar 16, 2013 at 4:22

1$\begingroup$ @Francois: A typo, should be $\zeta(4)/\zeta^2(2)$. $\endgroup$ Mar 16, 2013 at 4:24

$\begingroup$ @i707107: Are you saying that you can derive that formula without using values of $\zeta$ at all, or that you can calculate it from $\zeta(2)$ alone? $\endgroup$ Mar 16, 2013 at 14:51
A formula that surely belongs here linking $\pi$ and the primes is $$2.3.5.7...=4\pi^2.$$ This is obtained via a zeta regularization in a similar way to the more wellknown $\infty!=\sqrt{2\pi}$ (see e.g. here for a short discussion of this). However, to find the product of the primes, one uses the prime zeta function $$\sum_{p\; prime} \frac{1}{p^s}$$ which has the unfortunate property of having infinitely many singularities between 0 and 1 which breaks the standard regularization procedure. E. Muñoz García and R. Pérez Marco circumvent this problem (literally) by adding in an extra variable and taking the limit from a different direction.

2$\begingroup$ What is funny is that they consider 1 to be a prime number... (although this makes no difference for the product). $\endgroup$– ACLMar 15, 2013 at 17:20

7$\begingroup$ I certainly would not say that that divergent product has a value. Writing the equation that way causes much more harm, in my opinion, than the slight good that it communicates to people who already know exactly what is trying to be communicated. $\endgroup$ Mar 16, 2013 at 6:18
There are a few formulas relating $\pi$ to arithmetic functions. For example, if $\sigma(n)$ is the sum of the divisors of $n$, then $\sum_1^n\sigma(n)=\pi^2n^2/12+O(n\log n)$. If $d(n)$ is the number of divisors of $n$, then $\sum_1^{\infty}n^{2}d(n)=\pi^4/36$. If $\phi(n)$ is the Euler phifunction, then $\sum_1^n\phi(n)=3n^2\pi^{2}+O(n\log n)$. These all appear in Section 3.5 of Eymard and Lafon, The Number $\pi$.

$\begingroup$ By the way, do you happen to know what constant appears if we change $\sigma(n)$ into the sum $\sigma'$ of all Gaussian integer divisors of n with positive real parts? I.e. this sequence: oeis.org/A078930 Computations show that $\sum_1^n\sigma'(i)\approx Cn^2$, where C=1.7972... $\endgroup$ Oct 18, 2012 at 9:44
There is a nice story, initiated by L. Van Hamme, which relates several Ramanujan's formulas for $\pi$ to supercongruences modulo powers of primes. The simplest way to witness this route is to make a look at (my) https://arxiv.org/abs/0805.2788 .
More elementary: the probability that two positive integers have GCD=1 is $6/\pi^2 = 1/\zeta(2)$ because the probability that a prime $p$ divides the GCD is 1/p^2 by considering each p by p block of pairs of positive integers. More generally, the probability that k positive integers have GCD 1 is $1/\zeta(k)$ by a similar argument.