cp's OEIS Frontend

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.

A230980 Number of primes <= n, starting at n=0.

This page as a plain text file.
%I A230980 #59 Mar 16 2023 09:47:31
%S A230980 0,0,1,2,2,3,3,4,4,4,4,5,5,6,6,6,6,7,7,8,8,8,8,9,9,9,9,9,9,10,10,11,
%T A230980 11,11,11,11,11,12,12,12,12,13,13,14,14,14,14,15,15,15,15,15,15,16,16,
%U A230980 16,16,16,16,17,17,18,18,18,18,18,18,19,19,19,19,20,20,21,21,21,21,21,21
%N A230980 Number of primes <= n, starting at n=0.
%C A230980 Essentially identical to A000720, except that sequence, being an arithmetical sequence, starts at n = 1. - _N. J. A. Sloane_, Jun 21 2017
%C A230980 Also, on the first quadrant of the square grid, consider a diagram in which the number of cells in the horizontal bar of the k-th row is equal to the k-th prime, see example. The total length of the boundary segments between the structure formed by the first k horizontal bars and the structure formed by the vertical bars, from [0, 0], is equal to A014688(k). a(n) is the number of cells in the vertical bar of the n-th column.
%C A230980 Note that in a similar diagram for A000720 the lengths of the horizontal bars give A006093 (primes minus 1) not A000040 (the prime numbers) because A000720 has only one zero, not two.
%C A230980 Also, the number of distinct prime factors of the factorial number n!. - _Torlach Rush_, Jan 17 2014
%C A230980 The lengths of the boundary horizontal segments between the structure formed by the horizontal bars and the structure formed by the vertical bars of the diagram gives A054541. The zig-zag path formed by the boundary segments is in A230850. - _Omar E. Pol_, Jun 22 2017
%H A230980 Vincenzo Librandi, <a href="/A230980/b230980.txt">Table of n, a(n) for n = 0..5000</a>
%e A230980 Illustration of initial terms:
%e A230980 .     _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
%e A230980 31   |_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|
%e A230980 29   |_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _| | |
%e A230980 23   |_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _| | | | | | | | |
%e A230980 19   |_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _| | | | | | | | | | | | |
%e A230980 17   |_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _| | | | | | | | | | | | | | |
%e A230980 13   |_ _ _ _ _ _ _ _ _ _ _ _ _| | | | | | | | | | | | | | | | | | |
%e A230980 11   |_ _ _ _ _ _ _ _ _ _ _| | | | | | | | | | | | | | | | | | | | |
%e A230980 7    |_ _ _ _ _ _ _| | | | | | | | | | | | | | | | | | | | | | | | |
%e A230980 5    |_ _ _ _ _| | | | | | | | | | | | | | | | | | | | | | | | | | |
%e A230980 3    |_ _ _| | | | | | | | | | | | | | | | | | | | | | | | | | | | |
%e A230980 2    |_ _|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|
%e A230980 .
%e A230980 n:    0 1 2 3 4 5 6 7 8 9...
%e A230980 a(n): 0 0 1 2 2 3 3 4 4 4 4 5 5 6 6 6 6 7 7 8 8 8 8 9 9 9 9 9 9 10 10
%t A230980 Array[PrimePi@# &, 90, 0] (* _Robert G. Wilson v_, Jun 21 2017 *)
%t A230980 Accumulate[Table[If[PrimeQ[n],1,0],{n,0,100}]] (* _Harvey P. Dale_, Mar 16 2023 *)
%o A230980 (Magma) [0] cat [#PrimesUpTo(n-1): n in [2..200] ]; // _Vincenzo Librandi_, Jun 22 2017
%o A230980 (PARI) a(n)=primepi(n) \\ _Charles R Greathouse IV_, Jun 23 2017
%Y A230980 Cf. A000040, A000720, A001223, A006093, A007504, A014688, A054541, A141042, A182986, A230850.
%Y A230980 Partial sums of A010051.
%K A230980 nonn
%O A230980 0,4
%A A230980 _Omar E. Pol_, Nov 02 2013
%E A230980 Offset and definition changed by _N. J. A. Sloane_, Jun 21 2017