A143227 (Number of primes between n and 2n) - (number of primes between n^2 and (n+1)^2), if > 0.
1, 2, 1, 1, 1, 1, 2, 2, 3, 3, 3, 1, 1, 1, 1, 1, 2, 2, 1, 1, 1, 2, 2, 1, 1, 3, 2, 1, 1, 2, 2, 6, 3, 3, 1, 1, 1, 2, 1, 1, 1, 1, 6, 3, 8, 3, 2, 3, 2, 3, 1, 1, 4, 3, 10, 2, 1, 1, 2, 3, 1, 3, 4, 2, 2, 9, 7, 2, 2, 4, 3, 3, 1, 2, 3, 5, 1, 2, 3, 2, 11, 3, 1, 2, 4, 7, 1, 1, 1, 1, 1, 5, 1, 2, 3, 3, 4, 2, 2, 9, 5, 1, 4, 2, 2
Offset: 1
Keywords
Examples
The first positive value of ((pi(2n) - pi(n)) - (pi((n+1)^2) - pi(n^2))) is 1 (at n = 42), the 2nd is 2 (at n = 55) and the 3rd is 1 (at n = 56), so a(1) = 1, a(2) = 2, a(3) = 1.
References
- M. Aigner and C. M. Ziegler, Proofs from The Book, Chapter 2, Springer, NY, 2001.
- G. H. Hardy and E. M. Wright, An Introduction to the Theory of Numbers, 5th ed., Oxford Univ. Press, 1989, p. 19.
- S. Ramanujan, Collected Papers of Srinivasa Ramanujan (G. H. Hardy, S. Aiyar, P. Venkatesvara and B. M. Wilson, eds.), Amer. Math. Soc., Providence, 2000, pp. 208-209.
Links
- T. D. Noe, Table of n, a(n) for n=1..413
- T. Hashimoto, On a certain relation between Legendre's conjecture and Bertrand's postulate, arXiv:0807.3690 [math.GM], 2008.
- M. Hassani, Counting primes in the interval (n^2,(n+1)^2), arXiv:math/0607096 [math.NT], 2006.
- T. D. Noe, Plot of the points (A143226(n), A143227(n))
- J. Pintz, Landau's problems on primes
- S. Ramanujan, A proof of Bertrand's postulate, J. Indian Math. Soc., 11 (1919), 181-182.
- J. Sondow, Ramanujan Prime in MathWorld.
- J. Sondow and E. W. Weisstein, Bertrand's Postulate in MathWorld.
- E. W. Weisstein, Legendre's Conjecture in MathWorld.
Crossrefs
Programs
-
Mathematica
L={}; Do[ With[ {d=(PrimePi[2n]-PrimePi[n])-(PrimePi[(n+1)^2]-PrimePi[n^2])}, If[d>0, L=Append[L,d]]], {n,0,1000}]; L Select[Table[(PrimePi[2n]-PrimePi[n])-(PrimePi[(n+1)^2]-PrimePi[n^2]),{n,1000}],#>0&] (* Harvey P. Dale, Jun 19 2019 *)
Comments