In the following simulation it is used the fact that the probability of two random integers being coprime is 6/π².[br][br][b]Instructions:[/b] Change the Total sample (n) of random numbers to approximate π.[br]
Inspired by Matt Parker's video from his channel [url=https://www.youtube.com/channel/UCSju5G2aFaWMqn-_0YBtq5A]Standupmahts[/url]:
Here [url=http://www.cut-the-knot.org/m/Probability/TwoCoprime.shtml]http://www.cut-the-knot.org/[/url] you can find some proofs that the probability of two random integers being coprime is 6/π².[br][br]