The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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!)
A340802 Number of composite numbers between the largest noncomposite number <= n! and the smallest noncomposite number >= n!. 2
0, 0, 1, 5, 13, 7, 11, 53, 29, 21, 13, 29, 89, 19, 89, 75, 89, 77, 189, 59, 61, 103, 185, 203, 189, 95, 43, 167, 253, 107, 187, 79, 37, 289, 173, 257, 97, 43, 169, 135, 131, 175, 179, 155, 291, 189, 311, 155, 141, 157, 449, 119, 129, 349, 131, 609, 383, 391, 429 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,4
LINKS
FORMULA
a(n) = A058054(n)-1 for n >= 2.
a(n) = A054588(n)-1 for n >= 3.
a(n) = 2 * A340013 - 1 for n >= 3.
EXAMPLE
a(4) = 5: 24, 25, 26, 27, 28.
a(5) = 13: 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126.
a(6) = 7: 720, 721, 722, 723, 724, 725, 726.
MAPLE
prevprime(2):= 1:
a:= n-> (f-> max(nextprime(f-1)-prevprime(f+1)-1, 0))(n!):
seq(a(n), n=1..64);
MATHEMATICA
a[n_] := If[n<3, 0, NextPrime[n!] - NextPrime[n!, -1] - 1];
Array[a, 100] (* Jean-François Alcover, Jan 29 2021 *)
CROSSREFS
Sequence in context: A337513 A094473 A068530 * A088315 A138296 A094474
KEYWORD
nonn
AUTHOR
Alois P. Heinz, Jan 21 2021
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 May 21 12:09 EDT 2024. Contains 372736 sequences. (Running on oeis4.)