• + 0 comments

    Hi! Because it is NOT looking for distinct primes in range [1,n], it is rather looking for the maximum distinct prime FACTORS of any number in the range. All positive integer numbers can be represented by a multiplication of prime numbers, for example: * 12, which is 2 * 2 * 3 * 30, which is 2 * 3 * 5

    So, 30 has 3 distinct prime factors, while 12 has 2 distinct prime factors. If you take into account that 2*5*7=210, any number smaller than 210 would have a maximum of 3 distinct prime FACTORS.