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

All primes. Not just the primes you choose. The set of the first n primes here would be {2,3,5,7}. The product plus 1 is 235*7+1 = 211 is prime.


The product of the first n primes + 1 is not always prime, though. See https://en.m.wikipedia.org/wiki/Euclid_number


  2*3*5*7*11*13 + 1 = 30031 = 59*509
Neither 59 nor 509 is in {2, 3, 5, 7, 11, 13}, so the proof still holds, but the resultant number is not a "prime" number.




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

Search: