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.

A006794 Primorial -1 primes: primes p such that -1 + product of primes up to p is prime.

This page as a plain text file.
%I A006794 M2474 #101 Mar 28 2025 04:55:26
%S A006794 3,5,11,13,41,89,317,337,991,1873,2053,2377,4093,4297,4583,6569,13033,
%T A006794 15877,843301,1098133,3267113,4778027,6354977,6533299
%N A006794 Primorial -1 primes: primes p such that -1 + product of primes up to p is prime.
%C A006794 Or, p such that primorial(p) - 1 is prime.
%C A006794 Conjecture: if p# - 1 is a prime number, then the previous prime is greater than p# - exp(1)*p. - _Arkadiusz Wesolowski_, Jun 19 2016
%D A006794 H. Dubner, Factorial and primorial primes, J. Rec. Math., 19 (No. 3, 1987), 197-203.
%D A006794 R. K. Guy, Unsolved Problems in Number Theory, Section A2.
%D A006794 Paulo Ribenboim, The Little Book of Bigger Primes, Springer-Verlag NY 2004. See pp. 4-5.
%D A006794 N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
%D A006794 David Wells, The Penguin Dictionary of Curious and Interesting Numbers. Penguin Books, NY, 1986, Revised edition 1987. See p. 111.
%H A006794 C. K. Caldwell, <a href="https://t5k.org/primes/search.php?Description=%5E[[:digit:]]{1,}%23-1">Prime Pages: Database Search</a>.
%H A006794 C. K. Caldwell, <a href="https://t5k.org/glossary/page.php?sort=PrimorialPrime">Primorial Primes</a>.
%H A006794 C. K. Caldwell, <a href="http://dx.doi.org/10.1090/S0025-5718-1995-1284663-3">On the primality of n! +- 1 and 2*3*5*...*p +- 1</a>, Math. Comput. 64, 889-890, 1995.
%H A006794 C. K. Caldwell and Y. Gallot, <a href="http://dx.doi.org/10.1090/S0025-5718-01-01315-1">On the primality of n!+-1 and 2*3*5*...*p+-1</a>, Math. Comp., 71 (2001), 441-448.
%H A006794 H. Dubner, <a href="/A006794/a006794.pdf">Factorial and primorial primes</a>, J. Rec. Math., 19 (No. 3, 1987), 197-203. (Annotated scanned copy)
%H A006794 Des MacHale, <a href="http://dx.doi.org/10.2307/3621650">Infinitely many proofs that there are infinitely many primes</a>, Math. Gazette, 97 (No. 540, 2013), 495-498.
%H A006794 R. Mestrovic, <a href="http://arxiv.org/abs/1202.3670">Euclid's theorem on the infinitude of primes: a historical survey of its proofs (300 BC--2012) and another new proof</a>, arXiv preprint arXiv:1202.3670 [math.HO], 2012. - _N. J. A. Sloane_, Jun 13 2012
%H A006794 PrimeGrid, <a href="https://web.archive.org/web/20230707095431/http://prpnet.primegrid.com:12008/user_primes.html">Primorial Prime Search - Primes by User</a>.
%H A006794 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/PrimorialPrime.html">Primorial Prime</a>.
%F A006794 a(n) = A000040(A057704(n)).
%F A006794 a(n) = prime(A057704(n)).
%t A006794 primorial[p_] := Product[Prime[k], {k, 1, PrimePi[p]}]; Select[Prime[Range[1900]], PrimeQ[primorial[#] - 1] &] (* _Jean-François Alcover_, Mar 16 2011 *)
%t A006794 Transpose[With[{pr=Prime[Range[2000]]},Select[Thread[{Rest[FoldList[ Times,1,pr]], pr}], PrimeQ[ First[#]-1]&]]][[2]] (* _Harvey P. Dale_, Jun 21 2011 *)
%t A006794 With[{p = Prime[Range[200]]}, p[[Flatten[Position[Rest[FoldList[Times, 1, p]] - 1, _?PrimeQ]]]]] (* _Eric W. Weisstein_, Nov 03 2015 *)
%o A006794 (PARI) is(n)=isprime(n) && ispseudoprime(prod(i=1,primepi(n),prime(i))-1) \\ _Charles R Greathouse IV_, Apr 29 2015
%o A006794 (Python)
%o A006794 from sympy import nextprime, isprime
%o A006794 A006794_list, p, q = [], 2, 2
%o A006794 while p < 10**5:
%o A006794     if isprime(q-1):
%o A006794         A006794_list.append(p)
%o A006794     p = nextprime(p)
%o A006794     q *= p # _Chai Wah Wu_, Apr 03 2021
%Y A006794 Cf. A057704 (Primorial - 1 prime indices: integers n such that the n-th primorial minus 1 is prime).
%Y A006794 Cf. A057705, A002110, A005234, A014545, A018239.
%K A006794 nonn,hard,more,nice
%O A006794 1,1
%A A006794 _N. J. A. Sloane_
%E A006794 Stated incorrectly in CRC Standard Mathematical Tables and Formulae, 30th ed., 1996, p. 101; corrected in 2nd printing.
%E A006794 Corrected by Arlin Anderson (starship1(AT)gmail.com), who reports that he and Don Robinson have checked this sequence through about 63000 digits without finding another term (Jul 04 2000).
%E A006794 a(19)-a(20) from _Eric W. Weisstein_, Dec 08 2015 (Mark Rodenkirch confirms based on saved log files that all p < 700000 have been tested)
%E A006794 a(21) from _Jeppe Stig Nielsen_, Oct 19 2021
%E A006794 a(22)-a(24) from _Jeppe Stig Nielsen_, Dec 16 2024