WOLFRAM|DEMONSTRATIONS PROJECT

Relative Primes and GCDs

​
size of grid
10
GCD
1
2
3
4
5
6
7
Number of blue:
256
Probability of blue:
0.58050
Number of yellow:
185
Probability of yellow:
0.41950
The graphic plots a blue rectangle when the GCD of the
(x,y)
coordinate is equal to the GCD setting, and a yellow rectangle otherwise. When the GCD is set to 1, blue represents all of the pairs that are relatively prime.