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

 


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A065890 Number of composites less than the n-th prime. 9

%I #19 Sep 08 2022 08:45:04

%S 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,

%T 74,75,78,79,82,95,98,103,104,113,114,119,124,127,132,137,138,147,148,

%U 151,152,163,174,177,178,181,186,187,196,201,206,211,212,217,220,221

%N Number of composites less than the n-th prime.

%C First differences form A046933, which requires that for this sequence the parity of successive terms alternates.

%H Harry J. Smith, <a href="/A065890/b065890.txt">Table of n, a(n) for n=1..1000</a>

%F a(n) = A000040(n)-n-1 = A014689(n)-1 = A014692(n)-2.

%e p = p(25) = 97 is the 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.

%t CompositePi[n_Integer] := (n - PrimePi[n] - 1); Table[ CompositePi[ Prime[n]], {n, 1, 75} ]

%o (PARI) { for (n=1, 1000, p=prime(n); a=p - primepi(p) - 1; write("b065890.txt", n, " ", a) ) } \\ _Harry J. Smith_, Nov 03 2009

%o (Magma) [NthPrime(n)-n-1: n in [1..65]]; // _Vincenzo Librandi_, Aug 15 2015

%Y Cf. A000040, A014689, A014692, A002808, A018252, A065855, A046933.

%K nonn

%O 1,4

%A _Labos Elemer_ and _Robert G. Wilson v_, Nov 28 2001

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | 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 September 18 15:46 EDT 2024. Contains 376000 sequences. (Running on oeis4.)