Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Moreover checking if number is prime is hard in itself, because you need to check for divisibility by all previous prime numbers up until square root of prime candidate you are trying to check.

That is not true - since 2002 a deterministic polynomial time primality test is known [1]. And even before that primality test faster than trial division were known [2].

Besides that it is true that there is currently no known algorithm to easily enumerate all primes but it is not impossible that such an algorithm exists.

[1] http://en.wikipedia.org/wiki/AKS_primality_test

[2] http://en.wikipedia.org/wiki/Primality_test



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: