This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A065890 #28 Dec 30 2024 12:54:36 %S A065890 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 A065890 74,75,78,79,82,95,98,103,104,113,114,119,124,127,132,137,138,147,148, %U A065890 151,152,163,174,177,178,181,186,187,196,201,206,211,212,217,220,221 %N A065890 Number of composites less than the n-th prime. %C A065890 First differences form A046933, which requires that for this sequence the parity of successive terms alternates. %H A065890 Harry J. Smith, <a href="/A065890/b065890.txt">Table of n, a(n) for n=1..1000</a> %F A065890 a(n) = A065855(A000040(n)). %F A065890 a(n) = A000040(n)-n-1 = A014689(n)-1 = A014692(n)-2. %e A065890 a(25) = 71 since prime(25) = 97 is the 25th prime and 96 is the 71st composite number in A002808. %t A065890 CompositePi[n_Integer] := (n - PrimePi[n] - 1); Table[ CompositePi[ Prime[n]], {n, 1, 75} ] %o A065890 (PARI) a(n) = { prime(n) - n - 1 } \\ _Harry J. Smith_, Nov 03 2009 %o A065890 (Magma) [NthPrime(n)-n-1: n in [1..65]]; // _Vincenzo Librandi_, Aug 15 2015 %o A065890 (Python) %o A065890 from sympy import prime %o A065890 def A065890(n): return prime(n)-n-1 # _Chai Wah Wu_, Oct 11 2024 %Y A065890 Cf. A000040, A014689, A014692, A002808, A018252, A065855, A046933. %K A065890 nonn %O A065890 1,4 %A A065890 _Labos Elemer_ and _Robert G. Wilson v_, Nov 28 2001