%I #28 Dec 25 2022 08:31:51
%S 3,5,11,37,223,2333,30047,510529,9699713,223092907,6469693291,
%T 200560490197,7420738134871,304250263527281,13082761331670077,
%U 614889782588491517,32589158477190044789,1922760350154212639131
%N Smallest prime > prime(1)*prime(2)*...*prime(n)+1.
%H S. W. Golomb, <a href="http://www.jstor.org/stable/2689634">The evidence for Fortune's conjecture</a>, Math. Mag. 54 (1981), 209-210.
%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/FortunatePrime.html">Fortunate Prime</a>
%F a(n) = A002110(n) + A005235(n) for n > 0. - _Jonathan Sondow_, Dec 02 2015
%e Next prime after 2*3*5 + 1 = 31 is 37, so a(3)=37.
%t Table[NextPrime[Product[Prime@ k, {k, n}] + 1], {n, 0, 17}] (* _Michael De Vlieger_, Dec 02 2015 *)
%o (PARI) a(n) = nextprime(2+factorback(primes(n))); \\ _Michel Marcus_, Dec 24 2022
%o (Python)
%o from sympy import nextprime, primorial
%o def a(n): return nextprime(1 + (primorial(n) if n else 1))
%o print([a(n) for n in range(18)]) # _Michael S. Branicky_, Dec 24 2022
%Y Cf. A002110, A005235, A006862, A038710.
%K nonn
%O 0,1
%A _N. J. A. Sloane_