%I A014545 #116 Dec 31 2025 16:58:10
%S A014545 0,1,2,3,4,5,11,75,171,172,384,457,616,643,1391,1613,2122,2647,2673,
%T A014545 4413,13494,31260,33237,304723,365071,436504,498865,637491
%N A014545 Numbers k such that the k-th Euclid number A006862(k) = 1 + (Product of first k primes) is prime.
%D A014545 J.-M. De Koninck, Ces nombres qui nous fascinent, Entry 211, p. 61, Ellipses, Paris 2008.
%D A014545 James J. Tattersall, Elementary Number Theory in Nine Chapters, Cambridge University Press, 1999, page 114.
%H A014545 C. K. Caldwell, Prime Pages: Database Search
%H A014545 C. K. Caldwell, Primorial Primes.
%H A014545 H. Ibstedt, A Few Smarandache Sequences, Smarandache Notions Journal, Vol. 8, No. 1-2-3, 1997, 170-183.
%H A014545 Benny Lim, Prime Numbers Generated From Highly Composite Numbers, Parabola (2018) Vol. 54, Issue 3.
%H A014545 Eric Weisstein's World of Mathematics, Euclid Number
%H A014545 Eric Weisstein's World of Mathematics, Primorial Prime
%H A014545 Eric Weisstein's World of Mathematics, Integer Sequence Primes
%F A014545 a(n+1) = A000720(A005234(n)). - _M. F. Hasler_, May 31 2018
%e A014545 a(1) = 0 because the (empty) product of 0 primes is 1, plus 1 yields the prime 2.
%e A014545 prime(4413) = 42209 and Primorial(4413) + 1 = 42209# + 1 is a 18241-digit prime.
%e A014545 prime(13494) = 145823 and Primorial(13494) + 1 = 145823# + 1 is a 63142-digit prime.
%p A014545 P:= 1:
%p A014545 p:= 1:
%p A014545 count:= 0:
%p A014545 for n from 1 to 1000 do
%p A014545 p:= nextprime(p);
%p A014545 P:= P*p;
%p A014545 if isprime(P+1) then
%p A014545 count:= count+1;
%p A014545 A[count]:= n;
%p A014545 fi
%p A014545 od:
%p A014545 seq(A[i], i=1..count); # _Robert Israel_, Nov 04 2015
%t A014545 Flatten[Position[Rest[FoldList[Times,1,Prime[Range[180]]]]+1,_?PrimeQ]] (* _Harvey P. Dale_, May 04 2012 *) (* this program generates the first 9 positive terms of the sequence; changing the Range constant to 33237 will generate all 23 terms above, but it will take a long time to do so *)
%o A014545 (PARI) is(n)=ispseudoprime(prod(i=1,n,prime(i))+1) \\ _Charles R Greathouse IV_, Mar 21 2013
%o A014545 (PARI) P=1; n=0; forprime(p=1, 10^5, if(ispseudoprime(P+1), print1(n", ")); n=n+1; P*=p;) \\ _Hans Loeblich_, May 10 2019
%Y A014545 Cf. A005234 (values of p such that 1 + product of primes <= p is prime).
%Y A014545 Cf. A018239 (primorial plus 1 primes).
%Y A014545 Cf. A002110, A006862, A057704.
%Y A014545 Disjoint to A391020.
%K A014545 nonn,nice,hard,more
%O A014545 1,3
%A A014545 _Eric W. Weisstein_, _Murray R. Bremner_
%E A014545 More terms from _Labos Elemer_
%E A014545 a(21) from Arlin Anderson (starship1(AT)gmail.com), Oct 20 2000
%E A014545 a(22)-a(23) from _Eric W. Weisstein_, Mar 13 2004 (based on information in A057704)
%E A014545 Offset and first term changed by _Altug Alkan_, Nov 27 2015
%E A014545 a(24) from _Jeppe Stig Nielsen_, Aug 08 2024
%E A014545 a(25) from _Jeppe Stig Nielsen_, Sep 01 2024
%E A014545 a(26) from _Jeppe Stig Nielsen_, Sep 24 2024
%E A014545 a(27) from _Jeppe Stig Nielsen_, Nov 10 2024
%E A014545 a(28) from _Jeppe Stig Nielsen_, Aug 21 2025