login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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
Sequence in context: A214421 A294237 A162706 * A239433 A014091 A308040
KEYWORD
nonn
AUTHOR
Cino Hilliard, Nov 06 2003
EXTENSIONS
More terms from Ray Chandler, Nov 09 2003
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified July 20 20:43 EDT 2024. Contains 374459 sequences. (Running on oeis4.)