%I #76 Apr 03 2023 10:36:09
%S 2,3,5,6,13,24,66,68,167,287,310,352,564,590,620,849,1552,1849,67132,
%T 85586,234725
%N Primorial - 1 prime indices: integers m such that the m-th primorial minus 1 is prime.
%C There are two versions of "primorial": this is using the definition in A002110. - _Robert Israel_, Dec 30 2014
%C As of 28 February 2012, the largest known primorial prime is A002110(85586) - 1 with 476311 digits, found by the PrimeGrid project (see link). - _Dmitry Kamenetsky_, Aug 11 2015
%H Chris K. Caldwell, <a href="https://t5k.org/primes/search.php?Description=%5E[[:digit:]]{1,}%23-1&Style=HTML">Prime Pages: Database Search</a>
%H Chris K. Caldwell, <a href="https://t5k.org/top20/page.php?id=5">The top 20: primorial primes</a>
%H SÃlvia Casacuberta, <a href="https://arxiv.org/abs/1906.07652">On the divisibility of binomial coefficients</a>, arXiv:1906.07652 [math.NT], 2019. Mentions this sequence.
%H Benny Lim, <a href="https://www.parabola.unsw.edu.au/2010-2019/volume-54-2018/issue-3/article/prime-numbers-generated-highly-composite-numbers">Prime Numbers Generated From Highly Composite Numbers</a>, Parabola (2018) Vol. 54, Issue 3.
%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/IntegerSequencePrimes.html">Integer Sequence Primes</a>
%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/PrimorialPrime.html">Primorial Prime</a>
%H Wikipedia, <a href="https://en.wikipedia.org/wiki/Primorial_prime">Primorial prime</a>
%F a(n) = A000720(A006794(n)).
%F a(n) = primepi(A006794(n)).
%e The 6th primorial is A002110(6) = 2*3*5*7*11*13 = 30030, and 30030 - 1 = 30029 is a prime, so 6 is in the sequence.
%p P:= 1:
%p p:= 1:
%p count:= 0:
%p for n from 1 to 1000 do
%p p:= nextprime(p);
%p P:= P*p;
%p if isprime(P-1) then
%p count:= count+1;
%p A[count]:= n;
%p fi
%p od:
%p seq(A[i],i=1..count); # _Robert Israel_, Dec 25 2014
%t a057704[n_] :=
%t Flatten@Position[
%t Rest[FoldList[Times, 1, Prime[Range[n]]]] - 1, _Integer?PrimeQ]; a057704[500] (* _Michael De Vlieger_, Dec 25 2014 *)
%o (PARI) lista(nn) = {s = 1; for(k=1, nn, s *= prime(k); if(ispseudoprime(s - 1), print1(k, ", ")); ); } \\ _Altug Alkan_, Dec 08 2015
%o (PARI) is(n) = ispseudoprime(prod(k=1, n, prime(k)) - 1); \\ _Altug Alkan_, Dec 08 2015
%Y Cf. A006794 (Primorial -1 primes: Primes p such that -1 + product of primes up to p is prime).
%Y Cf. A057705, A014545, A005234, A002110, A057706.
%K nonn,more
%O 1,1
%A _Labos Elemer_, Oct 24 2000
%E Corrected by Holzer Werner, Nov 28 2002
%E a(19)-a(20) from _Eric W. Weisstein_, Dec 08 2015 (Mark Rodenkirch confirms based on saved log files that all p < 700,000 have been tested)
%E a(21) from _Jeppe Stig Nielsen_, Oct 19 2021