MathOverflow is a question and answer site for professional mathematicians. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|cite|improve this question
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. – Ben Linowitz Mar 3 '10 at 19:54
This question should in my opinion be Community Wiki. – Grétar Amazeen Mar 3 '10 at 20:56
More generally, for all positive integers $n$, $\zeta(2n)$ is a rational multiple of $\pi^{2n}$. – Gerry Myerson Mar 3 '10 at 22:42
See also this related question -… – François G. Dorais Jun 19 '10 at 14:52
It shows up when one considers the infinite prime together with the usual primes: – Peter Arndt May 29 '14 at 16:12
up vote 49 down vote accepted

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 number-theoretical 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}{1-x^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 L-functions) 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 L-function 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 Swinnerton-Dyer 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 :-).

share|cite|improve this answer

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

share|cite|improve this answer

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_{k-1},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).

share|cite|improve this answer
Neat. Is there an easier way to see that $\zeta(4)/\zeta(2) = 5/2$? – François G. Dorais Mar 16 '13 at 0:18
@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. – Geoff Robinson Mar 16 '13 at 1:01
@Geoff: Another way of seeing this: $\sum_{(a,b)=1} \frac{1}{a^2b^2}=\frac{5}{2}$. – i707107 Mar 16 '13 at 4:22
@Francois: A typo, should be $\zeta(4)/\zeta^2(2)$. – i707107 Mar 16 '13 at 4:24
@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? – Geoff Robinson Mar 16 '13 at 14:51

A formula that surely belongs here linking $\pi$ and the primes is $$\pi^2.$$ This is obtained via a zeta regularization in a similar way to the more well-known $\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.

share|cite|improve this answer
What is funny is that they consider 1 to be a prime number... (although this makes no difference for the product). – ACL Mar 15 '13 at 17:20
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. – Greg Martin Mar 16 '13 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 phi-function, 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$.

share|cite|improve this answer
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: Computations show that $\sum_1^n\sigma'(i)\approx Cn^2$, where C=1.7972... – mathreader Oct 18 '12 at 9:44

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 right-hand 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.

share|cite|improve this answer
So $\pi = \infty$, or what do you want to say? -- Your series diverges ... . – Stefan Kohl Jul 21 '13 at 23:00
Replace addition with multiplication, the infinte series should be an infinte product. – Dag Oskar Madsen Jul 21 '13 at 23:30, formula (33) – Dag Oskar Madsen Jul 21 '13 at 23:53
pretty fascinating indeed. – Amit Jul 25 '15 at 14:34

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) .

share|cite|improve this answer

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.

share|cite|improve this answer

protected by quid Jun 8 '15 at 13:21

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.