Project Euler #187: Semiprimes

  • + 1 comment

    This wiki article is quite comprehensive https://en.wikipedia.org/wiki/Prime-counting_function and also quite complex. Good luck on reading through it!!!

    My feeling is that there is no way to exactly know how many prime numbers there are less that a certain number without actually generating the prime numbers themselves. You can aproximate the number of primes but you would never be able to know exactly without generating the numbers. My reasoning behind this is that as far as I know there is currently no formula to generate the nth prime number and since there is no formula then there would be no way to accurately (that is exactly) say how many of them there are.

    But I'm no mathematician, and I'm sure others on this forum are way smarter than I am and would be able to lead you in the proper directions or share some other insights. I'm just using plain old common sense in my reasoning above.