This site is supported by donations to The OEIS Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A065890 Number of composites less than the n-th prime. 8
 0, 0, 1, 2, 5, 6, 9, 10, 13, 18, 19, 24, 27, 28, 31, 36, 41, 42, 47, 50, 51, 56, 59, 64, 71, 74, 75, 78, 79, 82, 95, 98, 103, 104, 113, 114, 119, 124, 127, 132, 137, 138, 147, 148, 151, 152, 163, 174, 177, 178, 181, 186, 187, 196, 201, 206, 211, 212, 217, 220, 221 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,4 COMMENTS First differences form A046933, which requires that for this sequence the parity of successive terms alternates. LINKS Harry J. Smith, Table of n, a(n) for n=1..1000 FORMULA a(n) = A000040(n)-n-1 = A014689(n)-1 = A014692(n)-2. EXAMPLE p = p(25) = 97 is th 25th prime,p-1 = 96 is the 71st composite number in A002808; it is also the 72nd nonprime in A018252; A065890(n) = composite [in A002808] index of p(n)-1; A014689(n) = composite [in A002808] index of p(n)+1; A014689(n) = nonprime [in A018252] index of p(n)-1; A014692(n) = nonprime [in A018252] index of p(n)+1. MATHEMATICA CompositePi[n_Integer] := (n - PrimePi[n] - 1); Table[ CompositePi[ Prime[n]], {n, 1, 75} ] PROG (PARI) { for (n=1, 1000, p=prime(n); a=p - primepi(p) - 1; write("b065890.txt", n, " ", a) ) } \\ Harry J. Smith, Nov 03 2009 (MAGMA) [NthPrime(n)-n-1: n in [1..65]]; // Vincenzo Librandi, Aug 15 2015 CROSSREFS Cf. A000040, A014689, A014692, A002808, A018252, A065855, A046933. Sequence in context: A187583 A000277 A003664 * A162177 A213730 A191172 Adjacent sequences:  A065887 A065888 A065889 * A065891 A065892 A065893 KEYWORD nonn AUTHOR Labos Elemer and Robert G. Wilson v, Nov 28 2001 STATUS approved

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

Last modified August 21 18:38 EDT 2019. Contains 326168 sequences. (Running on oeis4.)