Is there a formula to predict the next prime number?
Ive been trying to find a pattern in prime numbers.
The primes up to 100:
I noticed that except for 2 and 3, all primes are of the form . But not all numbers of this form are prime ().
Is there ANY formula that generates ONLY primes? I heard about:
- generates primes for to but fails at
- Mersenne primes
- Fermats formula
Why is finding a prime formula so hard? And are there methods to find the next prime without checking every odd number?
1 answers2.5k views