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

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A340803 Number of composite numbers between the largest noncomposite number <= prime(n)! and the smallest noncomposite number >= prime(n)!. 1
 0, 1, 13, 11, 13, 89, 89, 189, 185, 253, 187, 97, 131, 179, 311, 129, 429, 839, 263, 1607, 373, 527, 509, 305, 539, 617, 819, 1687, 565, 423, 2345, 959, 629, 631, 647, 1093, 835, 1937, 491, 1241, 2171, 1139, 731, 1423, 2011, 1817, 1935, 827, 1247, 911, 2669 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,3 LINKS Alois P. Heinz, Table of n, a(n) for n = 1..300 FORMULA a(n) = A340802(A000040(n)). EXAMPLE a(2) = 1: 6 because prime(2) = 3; 3! = 6 whose neighbors are noncomposites. a(3) = 13: 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126. a(4) = 11: 5040, 5041, 5042, 5043, 5044, 5045, 5046, 5047, 5048, 5049, 5050. MAPLE a:= n-> (f-> max(nextprime(f-1)-prevprime(f+1)-1, 0))(ithprime(n)!): seq(a(n), n=1..52); MATHEMATICA b[n_] := If[n < 3, 0, NextPrime[n!] - NextPrime[n!, -1] - 1]; a[n_] := b[Prime[n]]; Array[a, 52] (* Jean-François Alcover, Jan 29 2021 *) CROSSREFS Cf. A000040, A002808, A008578, A046933, A340802. Sequence in context: A158956 A259663 A160130 * A265770 A359868 A206607 Adjacent sequences: A340800 A340801 A340802 * A340804 A340805 A340806 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.

Last modified April 23 16:40 EDT 2024. Contains 371916 sequences. (Running on oeis4.)