Suppose $a$ and $b$ are positive integers such that $\gcd(a,b)$ is divisible by exactly $7$ distinct primes and $\mathop{\text{lcm}}[a,b]$ is divisible by exactly $28$ distinct primes. If $a$ has fewer distinct prime factors than $b$, then $a$ has at most how many distinct prime factors?
GCD{510,510 and 107!] =510,510=2 * 3 * 5 * 7 * 11 * 13 * 17{7 distinct primes].
LCM{510,510, 107!} =107!= 2^102 * 3^50 * 5^25 * 7^17 * 11^9 * 13^8 * 17^6 * 19^5 * 23^4 * 29^3 * 31^3 * 37^2 * 41^2 * 43^2 * 47^2 * 53^2 * 59 * 61 * 67 * 71 * 73 * 79 * 83 * 89 * 97 * 101 * 103 * 107
{28 distinct primes}.
a and b have 7 prime factors in common.
a*b has 28 prime factors
so the number of prime factors of a or b that are not common to both is 21
a has less prime factors than b so at most 10 of these 21 extra prime factors belong to a
So the most prime factors that a can have is 7+10 =17