login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A053982
Numbers k such that 1 + product of first k composite numbers is prime.
3
1, 3, 7, 11, 16, 22, 39, 76, 116, 139, 149, 169, 179, 220, 372, 429, 1216, 2146, 3176, 5382, 5969, 12271, 15271, 43903
OFFSET
1,2
MATHEMATICA
Composite[n_Integer] := (k = n + PrimePi[n] + 1; While[k - PrimePi[k] - 1 != n, k++ ]; k); Do[ If[ PrimeQ[ Product[ Composite[k], {k, 1, n} ] + 1], Print[ n ] ], {n, 1, 430} ]
Position[FoldList[Times, Select[Range[1500], CompositeQ]], _?(PrimeQ[#+1]&)]//Flatten (* Harvey P. Dale, Dec 20 2022 *)
PROG
(PARI) lista(kmax) = {my(m = 1, k = 0); forcomposite(c = 1, , k++; if(k > kmax, break); m *= c; if(isprime(m+1), print1(k, ", "))); } \\ Amiram Eldar, Jun 03 2024
CROSSREFS
KEYWORD
nonn,more
AUTHOR
G. L. Honaker, Jr., Apr 02 2000
EXTENSIONS
More terms from Jeppe Stig Nielsen, Apr 16 2000 (terms from 76 on correspond to probable primes)
a(16)-a(17) from Robert G. Wilson v, Apr 20 2001
Edited by T. D. Noe, Oct 30 2008
a(18)-a(19) from Amiram Eldar, Jun 03 2024
a(20)-a(21) from Michael S. Branicky, Jun 04 2024
More terms via A049420 from Jeppe Stig Nielsen, Aug 12 2024
STATUS
approved