Logo

Greetings from The On-Line Encyclopedia of Integer Sequences!

Hints

Search: id:A131872
Displaying 1-1 of 1 results found. page 1
     Format: long | short | internal | text      Sort: relevance | references | number      Highlight: on | off
A131872 Set m = 0, n = 1. Find smallest k >= 2 such that pi(k) = (k-pi(k)) - (m-pi(m)); set a(n) = pi(k), m = k, n = n+1. Repeat. +0
1
1, 4, 8, 11, 16, 23, 30, 39, 50, 62, 78, 97, 119, 141, 172, 205, 242, 284, 334, 393, 455, 531, 615, 704, 811, 928, 1059, 1213, 1373, 1560, 1761, 1988, 2239, 2524, 2833, 3180, 3557, 3983, 4448, 4942, 5503, 6126, 6791, 7522, 8331, 9228, 10188, 11228 (list; graph; listen)
OFFSET

1,2

COMMENT

For n>1, a(n)-a(n-1) is approximately pi(n)^2/n.

LINKS

A. Granville and G. Martin, Prime number races

Eric Weisstein's World of Mathematics, Prime Counting Function

EXAMPLE

m=0, n=1; pi(2) = (2-1)-(0) = 1 = number of nonprimes from 1 to 2, a(1) = 1 is a term. Now n=2, m=2.

pi(9) = (9-4)-(2-1) = 4 = number of nonprimes from 3 to 9, a(2) = 4 is a term. Now n=3, m=9.

pi(21) = (21-8)-(9-4) = 8 = number of nonprimes from 10 to 21, a(3) = 8 is a term.

MATHEMATICA

m=0; Do[If[PrimePi[n]==(n-PrimePi[n])-(m-PrimePi[m]), Print[PrimePi[n]]; m=n], {n, 1, 10^6, 1}]

CROSSREFS

Cf. A000720, A062298.

Sequence in context: A054736 A024626 A023491 this_sequence A104655 A046898 A166550

Adjacent sequences: A131869 A131870 A131871 this_sequence A131873 A131874 A131875

KEYWORD

nonn

AUTHOR

Manuel Valdivia (mvaldivia(AT)ugr.es), Oct 05 2007

EXTENSIONS

Edited by N. J. A. Sloane (njas(AT)research.att.com), Nov 05 2007

page 1

Search completed in 0.002 seconds

Lookup | Welcome | Find friends | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
More pages | Superseeker | Maintained by N. J. A. Sloane (njas@research.att.com)

Last modified November 25 20:09 EST 2009. Contains 167514 sequences.


AT&T Labs Research