Is there a formula (or an efficient approach) for counting amount of positive numbers in range up to $N$ which have exactly $K$ divisors?
P.S.
Initial problem was to cluster number in range [1..N] according to the number of divisors. Then find multiplication of clusters' sizes factorials. So we just need compute the answer according to this scheme. The final result is a amount of sequencies formed such that first group has 1 divisor, second one has 2 and so on.