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.

Original entry on oeis.org

3, 5, 11, 37, 223, 2333, 30047, 510529, 9699713, 223092907, 6469693291, 200560490197, 7420738134871, 304250263527281, 13082761331670077, 614889782588491517, 32589158477190044789, 1922760350154212639131
Offset: 0

Views

Author

Keywords

Examples

			Next prime after 2*3*5 + 1 = 31 is 37, so a(3)=37.
		

Crossrefs

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

Formula

a(n) = A002110(n) + A005235(n) for n > 0. - Jonathan Sondow, Dec 02 2015