A square-free semiprime is a natural number that is the product of two distinct prime numbers.
Given a natural number
n, count all square-free semiprimes less than or equal to
Please write a function or procedure that accepts a single integer parameter and counts all square-free semiprimes less than or equal to its parameter. The count must either be a return value of a function call or be printed to STDOUT.
The answer with the fewest number of characters wins.
In the event of a tie, the following criteria will be used in order:
- Worst space-complexity
f(1) = 0 f(62) = 18 f(420) = 124 f(10000) = 2600