CodingTrain / Suggestion-Box

A repo to track ideas for topics
570 stars 86 forks source link

Pi day approximation #1620

Open LeviCeKe opened 3 years ago

LeviCeKe commented 3 years ago

Hi Daniel, for Pi day this year, I was thinking you can try approximating pi by randomly generating pairs of natural numbers and checking the proportion that are relatively prime. It should be around 6/PI^2, so by inverting the experimental proportion, multiplying it by six, and taking its square root, you should get an approximation of pi. The inverse of Euler’s prime product works out to 6/PI^2 when s=2, and it’s equivalent to the probability that two randomly chosen natural numbers are both not both multiples of 2, not both multiples of three, not both multiples of five, etc. Mathologer has a great video about this:

https://www.youtube.com/watch?v=LFwSIdLSosI

I’m looking forward to seeing it if you’re interested!

Rainb0wSkeppy commented 2 years ago

He already did this https://www.youtube.com/watch?v=EvS_a921dBo