A rough Pi approximation from coprime integers

preview_player
Показать описание
In this short, plot all the points in the positive integer grid up to 101. If a coordinate (x,y) has numbers x and y that are relatively prime, we shade the dot blue; otherwise we shade the dot red. A famous result states that roughly 6/pi*pi of the dots will be blue. So we can use this image to get an approximation for 6/pi*pi and in turn use that to get an approximation for Pi. We get 3.12, which is not really good, but it’s kind of amazing that such a small grid gets us that close. Using a larger grid will give you a better approximation.

For more information about why this works, check out the wikipedia site:

For more Pi-related videos, check out my playlist:

#manim #approximation #relativelyprime #zetafunction #baselproblem #irrational #Pi #mathvideo​ #math​ #mtbos​ ​ #animation​​​ #iteachmath #mathematics #piday

To learn more about animating with manim, check out:
Рекомендации по теме
Комментарии
Автор

For those who are wondering why, here’s a proof though a bit complicated.

First look at the prob that two numbers share a prime factor. 1/2 of all numbers are divisible by 2, 1/3 of all numbers divisible by 3 and etc. In general, 1/p of all numbers are divisible by p.

The chance that both numbers are divisible by p is 1/p*1/p=1/p^2. Thus, the chance that p does not divide both of them is (1-1/p^2).

If the gcd of the two numbers are 1, then no prime is able to divide both of them. So the overall probability call it P is
for every prime number.

Now seemingly unrelated, consider 1/P. When we take the reciprocal of a product, we can take the reciprocal of each term then multiply.

1/P =
Now the key is that each bracket is a geometric series
1/(1-x)=1+x+x^2+…

So each bracket 1/(1-1/p^2) becomes 1 + 1/p^2 + 1/(p^2)^2 + 1/(p^3)^2 +…

If we substitute this for each bracket and do all the distribution, we get the sum
1+1/2^2+1/3^2+1/4^2+1/5^2+…
(Each bracket contains the prime to every possible power, and we are multiplying across all primes. So by FTA every whole number appears exactly once since we will have every possible combination of prime factorisations from the distribution)

This sum is famously known to be pi^2/6.
Thus, 1/P=pi^2/6
P=6/pi^2

In fact, if you chose n numbers, the probability that the n numbers are n-wise coprime is going to be 1/zeta(n) where
zeta(n)=1+1/2^n+1/3^n+1/4^n+…

This method is only an approximation because we cap x and y at 101. For this to be exact you have to allow x and y to be any arbitarily large size.

Ninja
Автор

I absolutely love this way of visualizing numbers. So much information about so many different aspects from such a simple map.

arlogodfrey
Автор

What I find interesting about the decimalization of the fraction 6/pi^2 is how it roughly approximates phi-1

shruggzdastr-facedclown
Автор

This seems familiar to zeta of 2 which is (pi)^2 /6. The zeta function relates to primes with analytic continuation, so naturally this similarity with the coprimes can relate with the Riemann Zeta Function.

jblook
Автор

interesting!! does it approach Pi when the number of cells increases?

MinhBui-hx
Автор

ive got a good way. first write down 3, since everyone knows that bit. then put the .14, and from there start randomly guessing numbers. close enough for engineering!

Swdh_Fs
Автор

does this only work for 101 because if so it's kind of not that interesting

JustinLe
Автор

Pi = approximately 3.1416, not approximately 3.1201

ÞeOfficialCeresouslyAnimatesYT
Автор

I am here to conclude yet again that this is extremely trivial as π is simply 3, i didnt know this proof but its quite fascinating it was able to get close to π to such a degree

hornkneeeee
Автор

Here's an interesting way to approximate pi:

Take the atomic number of carbon 666 and divide it by the boiling temperature of water 212. It's accurate to 4 decimal places.

Oldhogleg
welcome to shbcf.ru