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

>all primes greater than 3 are of the form 6k+1 or 6k-1

what's the value in using this "formula"? We could also keep extending this rule, and say that all primes greater than 5 are of the form 30k±1, 30k±7, 30k±11, or 30k±13. Or go further by multiplying coefficient of X with the next primes



30k±1 = 6x±1 where x = 5k and so on. Why use four formulas when one will suffice?


For the same reason you'd use 6x±1 instead of 1+2n or, more basically, n - higher check hit rate at the cost of more complex checking rules.




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

Search: