A positive integer is called ”nice” if it has at least three distinct positive divisors. How many ”nice” integers are there less than 100?

116 Views Asked by At

Well I've tried counting p^2 <= 100 (where p is a prime) there are 4 such no.s {4, 9, 25, 49} which have exactly 3 distinct divisors but how'd I be covering all cases less than 100

Thank You

1

There are 1 best solutions below

2
On

The answer is 74! (Not a factorial, just a regular exclamation mark) Because you just want the amount of composites less than 100, just subtract the number of primes less than 100 and remove 1 so we don't include the number 1 which is neither Prime not Composite.