As observed on [Mathworld](http://mathworld.wolfram.com/RelativelyPrime.html), "Amazingly, the probabilities for random pairs of integers and Gaussian integers being relatively prime are the same as the asymptotic densities of squarefree integers of these types" (respectively, 6/π2 and 6/π2K where K is Catalan's constant).


This seems to me unlikely to be a coincidence. Is there a deeper reason - or at least, a proof of this fact which is not equivalent to evaluating both probabilities and observing that they are equal?



Coprimality and squarefree numbers
To spell out what Robin said at a more basic level (blame me if this is inapt): Consider a given prime p. The chance that a "random integer" does **not** divide by $p^2$ is $1-1/p^2$. So heuristically the probability that the random integer is square free is the product of $1-1/p^2$ over all primes. Making that precise is not too hard. That this comes out to be $6/\pi^2$ is kind of amazing. But it is not so amazing that the probability to be relatively prime is the same: given a "random pair" of integers, the chance that they do not both divide by p is the same $1-1/p^2$. 


It would be cute to match up pairs (a,b) with integers n so that the set P of prime divisors of gcd(a,b) is the same as the set of primes whose square divides n. But it is not immediate to me how to do that. 


