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

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A230980 Number of primes <= n, starting at n=0. 3
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, 11, 11, 11, 11, 11, 12, 12, 12, 12, 13, 13, 14, 14, 14, 14, 15, 15, 15, 15, 15, 15, 16, 16, 16, 16, 16, 16, 17, 17, 18, 18, 18, 18, 18, 18, 19, 19, 19, 19, 20, 20, 21, 21, 21, 21, 21, 21 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,4
COMMENTS
Essentially identical to A000720, except that sequence, being an arithmetical sequence, starts at n = 1. - N. J. A. Sloane, Jun 21 2017
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.
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.
Also, the number of distinct prime factors of the factorial number n!. - Torlach Rush, Jan 17 2014
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
LINKS
EXAMPLE
Illustration of initial terms:
. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
31 |_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|
29 |_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _| | |
23 |_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _| | | | | | | | |
19 |_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _| | | | | | | | | | | | |
17 |_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _| | | | | | | | | | | | | | |
13 |_ _ _ _ _ _ _ _ _ _ _ _ _| | | | | | | | | | | | | | | | | | |
11 |_ _ _ _ _ _ _ _ _ _ _| | | | | | | | | | | | | | | | | | | | |
7 |_ _ _ _ _ _ _| | | | | | | | | | | | | | | | | | | | | | | | |
5 |_ _ _ _ _| | | | | | | | | | | | | | | | | | | | | | | | | | |
3 |_ _ _| | | | | | | | | | | | | | | | | | | | | | | | | | | | |
2 |_ _|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|
.
n: 0 1 2 3 4 5 6 7 8 9...
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
MATHEMATICA
Array[PrimePi@# &, 90, 0] (* Robert G. Wilson v, Jun 21 2017 *)
Accumulate[Table[If[PrimeQ[n], 1, 0], {n, 0, 100}]] (* Harvey P. Dale, Mar 16 2023 *)
PROG
(Magma) [0] cat [#PrimesUpTo(n-1): n in [2..200] ]; // Vincenzo Librandi, Jun 22 2017
(PARI) a(n)=primepi(n) \\ Charles R Greathouse IV, Jun 23 2017
CROSSREFS
Partial sums of A010051.
Sequence in context: A139789 A366033 A000720 * A070549 A255574 A283992
KEYWORD
nonn
AUTHOR
Omar E. Pol, Nov 02 2013
EXTENSIONS
Offset and definition changed by N. J. A. Sloane, Jun 21 2017
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | 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 April 30 22:38 EDT 2024. Contains 372141 sequences. (Running on oeis4.)