OFFSET
0,1
LINKS
S. W. Golomb, The evidence for Fortune's conjecture, Math. Mag. 54 (1981), 209-210.
Eric Weisstein's World of Mathematics, Fortunate Prime
FORMULA
EXAMPLE
Next prime after 2*3*5 + 1 = 31 is 37, so a(3)=37.
MATHEMATICA
Table[NextPrime[Product[Prime@ k, {k, n}] + 1], {n, 0, 17}] (* Michael De Vlieger, Dec 02 2015 *)
PROG
(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
CROSSREFS
KEYWORD
nonn,changed
AUTHOR
STATUS
approved