|
|
A088331
|
|
Numbers n such that all numbers between the largest prime preceding n! and the smallest prime following n! + n are composite.
|
|
1
|
|
|
4, 5, 6, 7, 8, 9, 10, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 28, 29, 30, 31, 32, 33, 34, 35, 36, 38, 39, 40, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 74, 75, 76, 78, 79, 80
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
LINKS
|
|
|
EXAMPLE
|
For n = 7 there are 11 consecutive primes (5040-5050) between primes 5039 and 5051. 7 is the 4th entry in the sequence. 11 does not appear because 11!+1 is prime.
|
|
MATHEMATICA
|
allCompQ[n_]:=Module[{nf=n!}, AllTrue[Range[NextPrime[nf, -1]+1, NextPrime[nf+n]-1], CompositeQ]]; Select[Range[80], allCompQ] (* Harvey P. Dale, Jul 15 2023 *)
|
|
PROG
|
(PARI) factgaps2(m) = { for(n=2, m, c=0; f=0; nf=n!; for(x=precprime(nf), nextprime(nf+n), if(isprime(nf+1), f=1; break); if(!isprime(x), c++) ); if(f==0, print1(n", ")) ) }
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|