cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A035345 Smallest prime > prime(1)*prime(2)*...*prime(n)+1.

This page as a plain text file.
%I A035345 #29 Feb 16 2025 08:32:37
%S A035345 3,5,11,37,223,2333,30047,510529,9699713,223092907,6469693291,
%T A035345 200560490197,7420738134871,304250263527281,13082761331670077,
%U A035345 614889782588491517,32589158477190044789,1922760350154212639131
%N A035345 Smallest prime > prime(1)*prime(2)*...*prime(n)+1.
%H A035345 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 A035345 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/FortunatePrime.html">Fortunate Prime</a>
%F A035345 a(n) = A002110(n) + A005235(n) for n > 0. - _Jonathan Sondow_, Dec 02 2015
%e A035345 Next prime after 2*3*5 + 1 = 31 is 37, so a(3)=37.
%t A035345 Table[NextPrime[Product[Prime@ k, {k, n}] + 1], {n, 0, 17}] (* _Michael De Vlieger_, Dec 02 2015 *)
%o A035345 (PARI) a(n) = nextprime(2+factorback(primes(n))); \\ _Michel Marcus_, Dec 24 2022
%o A035345 (Python)
%o A035345 from sympy import nextprime, primorial
%o A035345 def a(n): return nextprime(1 + (primorial(n) if n else 1))
%o A035345 print([a(n) for n in range(18)]) # _Michael S. Branicky_, Dec 24 2022
%Y A035345 Cf. A002110, A005235, A006862, A038710.
%K A035345 nonn
%O A035345 0,1
%A A035345 _N. J. A. Sloane_