Long-time Aperiodical muse David Cushing has made a bet with us that he can give us an interesting post every Friday for the next ten weeks. Every week that he sends a post, we buy him a bar of chocolate. Every week that he doesn’t send us a post, he buys us a bar of chocolate. For his first trick, David is going to do some unnatural things with the natural numbers.
The greatest common divisor (gcd) of two or more integers is the greatest integer that evenly divides those integers. For example, the gcd of
A reasonable question to ask is,
Given two randomly chosen integers
and , what is the probability that ?
“Randomly chosen integers” is a bit of a dodgy term but we’ll just ignore that and hope for the best.
If no prime divides
Now I need to say what I mean by “randomly chosen”. It’s very handwavey, but we will calculate the probability for an integer chosen uniformly at random between
Every
We now have the problem of evaluating this number. For those in the know, our expression looks pretty darn close to the definition of the Riemann zeta function:
(We used the Euler product formula to relate the product we had with the usual definition of the zeta function, which is a sum.)
By comparing the two equations, we can see that
Well, sort of. Now that we know the probability the gcd of two randomly chosen integers is
First of all, what’s the probability that
divides both and , and any other prime, only divide at most one of and .
As we said before,
Next, we can apply a similar argument to find the probability that
It should be clear that you can take a couple of steps from here to derive that, for any
So what’s the probability that the gcd of two randomly chosen integers is any prime? Well, that’s simply
To proceed any further we need to evaluate the sum of the reciprocals of the squares of the primes. When we did that with all the natural numbers, we used
Replacing our sum with
So about a quarter.
Let’s end with one more generalisation. Let’s say we have 3 randomly chosen integers. No, scrap that. Let’s say we have 4 randomly chosen integers. No, that’s still not right… I know – let’s say we have
Using similar arguments as above we can get that the probability of the gcd of
A nice simple(ish) answer and we are all done.
References
Proof of the Euler product formula for the Riemann zeta function
There are three different proofs that
The Wolfram MathWorld page on “relatively prime” contains the excellent observation that
“On the distribution of the greatest common divisor” by Persi Diaconis and Paul Erdős does all this rigorously, with error terms and everything.
One Response to “Cushing your luck: properties of randomly chosen numbers”