A035345 Smallest prime > prime(1)*prime(2)*...*prime(n)+1.
3, 5, 11, 37, 223, 2333, 30047, 510529, 9699713, 223092907, 6469693291, 200560490197, 7420738134871, 304250263527281, 13082761331670077, 614889782588491517, 32589158477190044789, 1922760350154212639131
Offset: 0
Keywords
Examples
Next prime after 2*3*5 + 1 = 31 is 37, so a(3)=37.
Links
- S. W. Golomb, The evidence for Fortune's conjecture, Math. Mag. 54 (1981), 209-210.
- Eric Weisstein's World of Mathematics, Fortunate Prime
Programs
-
Mathematica
Table[NextPrime[Product[Prime@ k, {k, n}] + 1], {n, 0, 17}] (* Michael De Vlieger, Dec 02 2015 *)
-
PARI
a(n) = nextprime(2+factorback(primes(n))); \\ Michel Marcus, Dec 24 2022
-
Python
from sympy import nextprime, primorial def a(n): return nextprime(1 + (primorial(n) if n else 1)) print([a(n) for n in range(18)]) # Michael S. Branicky, Dec 24 2022