# Why does $\pi$ appear in the probability of a number being square-free?

The probability of a number being square-free (i.e., the number has no divisor that is a square, cube, etc.) is $$6/\pi^2$$. I have seen many appearances of $$\pi$$, and this is also similar to them. All of them can be explained intuitively why pi appears in them. But I don't see any connection between square-free numbers and $$\pi$$. So my question is:

Why $$\pi$$ appears here?

Note: I don't want rigorous proofs, I want intuitive explanations.

• What do you mean by "The probability of a number being square free"? What is the mathematically rigorous definiition of this statement?
– 5xum
Dec 18, 2020 at 8:26
• @5xum Given any random positive number, what is the chance that it is square free? I don't know much about probability, but I think a better definition is this: Let the probability of a positive integer less than some positive integer $n$ being square free be $P(n)$. What is $\lim_{n\to\infty}P(n)$? Dec 18, 2020 at 8:30
• You're asking essentially for an intuitive explanation why $\pi$ appears in $\zeta(2)$ Dec 18, 2020 at 8:36
• I can meet you halfway: if we provide an intuitive explanation of squares' connection to $\pi$ to motivate $\zeta(2)=\pi^2/6$, we can finish with $\prod_{p\in\Bbb P}(1-p^{-2})=1/\zeta(2)=6/\pi^2$.
– J.G.
Dec 18, 2020 at 8:37
• @bof there are many probability problems where pi comes up. Almost all can be explained. Mathematics is what explains these. And for the reason why pi comes in a standard normal distribution, see this. Dec 18, 2020 at 9:34

• $$6/\pi^2$$ appears in the density of square-free numbers because $$\zeta(2)=\pi^2/6$$ and every integer is uniquely of the form $$k n^2$$ with $$k$$ square-free.
• Then $$\zeta(2)=\pi^2/6$$ because $$\frac{\pi^2}{\sin^2(\pi z)} = \sum_n \frac1{(z-n)^2}$$ This latter formula is magic: the LHS minus the RHS is a bounded entire function, thus constant, which is the great achievement of complex analysis.
• If you don't like it then the video mentioned in the comment is saying that $$\sum_{n=0}^{2^k} \frac1{|2^k (e^{2i \pi (2n+1)/2^{k+1}}-1)|^2}=1/4$$ and that $$\lim_{k\to \infty} \sum_{n=0}^{2^k} \frac1{|2^k (e^{2i \pi (2n+1)/2^{k+1}}-1)|^2}=\sum_{n=-\infty}^\infty \lim_{k\to \infty} \frac1{|2^k (e^{2i \pi (2n+1)/2^{k+1}}-1)|^2}$$ $$= \sum_{n=-\infty}^\infty \frac1{ |i\pi (2n+1)|^2} = \frac1{\pi^2}2(1-1/4)\zeta(2)$$