2

Given two numbers $m$ and $n$.
$\gcd(a_{1},a_{2},\ldots,a_{m})$ is the gcd of number $a_{1},a_{2},\ldots,a_{m}$.

How to find number of ways such that $\gcd(a_{1},a_{2},\ldots,a_{m})$ ($1\le a_{i}\le n$ ) is $1$?

Shashwat Kumar
  • 322
  • 4
  • 15

1 Answers1

1

Once $m$ is not very small, it will be almost $n \choose m$ The chance that $2$ is a factor of the GCD is roughly $2^{-m}$. For other primes, it is even smaller. An inclusion/exclusion argument says it is about $${n \choose m}\left(1- \sum_{p\ prime} p^{-m} + \sum_{p,q\ prime} (pq)^{-m}-\dots\right)$$

Ross Millikan
  • 374,822