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 A062298 #56 Sep 08 2022 08:45:03 %S A062298 1,1,1,2,2,3,3,4,5,6,6,7,7,8,9,10,10,11,11,12,13,14,14,15,16,17,18,19, %T A062298 19,20,20,21,22,23,24,25,25,26,27,28,28,29,29,30,31,32,32,33,34,35,36, %U A062298 37,37,38,39,40,41,42,42,43,43,44,45,46,47,48,48,49,50,51,51,52,52,53 %N A062298 Number of nonprimes <= n. %C A062298 a(n) = n - A000720(n). This is asymptotic to n - Li(n). Note that a(n) + A095117(n) = 2*n. - _Jonathan Vos Post_, Nov 22 2004 %C A062298 Same as number of primes between n and prime(n+1) and between n and prime(n)+1 (end points excluded); n prime -> a(n)=a(n-1), n composite-> a(n)=1+a(n-1). - _David James Sycamore_, Jul 23 2018 %C A062298 There exists at least one prime number between a(n) and n for n >= 3 (see the paper by Ya-Ping Lu attached in the links). - _Ya-Ping Lu_, Nov 27 2020 %H A062298 Harry J. Smith, <a href="/A062298/b062298.txt">Table of n, a(n) for n = 1..1000</a> %H A062298 Ya-Ping Lu, <a href="/A337788/a337788.pdf">Lower Bounds for the Number of Primes in Some Integer Intervals</a> %F A062298 a(n) = n - A000720(n). %F A062298 a(n) = 1 + A065855(n). - _David James Sycamore_, Jul 23 2018 %e A062298 a(19) = 11 as there are 8 primes up to 19 (inclusive). %p A062298 NumComposites := proc(N::posint) local count, i:count := 0:for i from 1 to N do if not isprime(i) then count := count + 1 fi:od: count;end:seq(NumComposites(binomial(k+1,k)), k=0..73); # _Zerinvary Lajos_, May 26 2008 %p A062298 A062298 := proc(n) n-numtheory[pi](n) ; end: seq(A062298(n),n=1..120) ; # _R. J. Mathar_, Sep 27 2009 %t A062298 Table[n-PrimePi[n],{n,80}] (* _Harvey P. Dale_, May 10 2012 *) %t A062298 Accumulate[Table[If[PrimeQ[n],0,1],{n,100}]] (* _Harvey P. Dale_, Feb 15 2017 *) %o A062298 (PARI) a(n) = n-primepi(n); \\ _Harry J. Smith_, Aug 04 2009 %o A062298 (Haskell) %o A062298 a062298 n = a062298_list !! (n-1) %o A062298 a062298_list = scanl1 (+) $ map (1 -) a010051_list %o A062298 -- _Reinhard Zumkeller_, Oct 10 2013 %o A062298 (Magma) [n - #PrimesUpTo(n): n in [1..100]]; // _Vincenzo Librandi_, Aug 05 2015 %o A062298 (Python) %o A062298 from sympy import primepi %o A062298 print([n - primepi(n) for n in range(1, 101)]) # _Indranil Ghosh_, Mar 29 2017 %Y A062298 Cf. A000720, A101203, A010051, A065855. %K A062298 nonn %O A062298 1,4 %A A062298 _Amarnath Murthy_, Jun 19 2001 %E A062298 Corrected and extended by _Vladeta Jovovic_, Jun 22 2001