[go: up one dir, main page]

login
Search: a143223 -id:a143223
     Sort: relevance | references | number | modified | created      Format: long | short | data
pi(n), the number of primes <= n. Sometimes called PrimePi(n) to distinguish it from the number 3.14159...
(Formerly M0256 N0090)
+10
1947
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
OFFSET
1,3
COMMENTS
Partial sums of A010051 (characteristic function of primes). - Jeremy Gardiner, Aug 13 2002
pi(n) and prime(n) are inverse functions: a(A000040(n)) = n and A000040(n) is the least number m such that A000040(a(m)) = A000040(n). A000040(a(n)) = n if (and only if) n is prime. - Jonathan Sondow, Dec 27 2004
See the additional references and links mentioned in A143227. - Jonathan Sondow, Aug 03 2008
A lower bound that gets better with larger N is that there are at least T prime numbers less than N, where the recursive function T is: T = N - N*Sum_{i=0..T(sqrt(N))} A005867(i)/A002110(i). - Ben Paul Thurston, Aug 23 2010
Number of partitions of 2n into exactly two parts with the smallest part prime. - Wesley Ivan Hurt, Jul 20 2013
Equivalent to the Riemann hypothesis: abs(a(n) - li(n)) < sqrt(n)*log(n)/(8*Pi), for n >= 2657, where li(n) is the logarithmic integral (Lowell Schoenfeld). - Ilya Gutkovskiy, Jul 05 2016
The second Hardy-Littlewood conjecture, that pi(x) + pi(y) >= pi(x + y) for integers x and y with min{x, y} >= 2, is known to hold for (x, y) sufficiently large (Udrescu 1975). - Peter Luschny, Jan 12 2021
REFERENCES
M. Abramowitz and I. A. Stegun, eds., Handbook of Mathematical Functions, National Bureau of Standards Applied Math. Series 55, 1964 (and various reprintings), p. 870.
Tom M. Apostol, Introduction to Analytic Number Theory, Springer-Verlag, 1976, p. 8.
Raymond Ayoub, An Introduction to the Analytic Theory of Numbers, Amer. Math. Soc., 1963; p. 129.
Richard Crandall and Carl Pomerance, Prime Numbers: A Computational Perspective, Springer, NY, 2001; see p. 5.
G. H. Hardy and E. M. Wright, An Introduction to the Theory of Numbers, 5th ed., Oxford Univ. Press, 1979, Theorems 6, 7, 420.
G. J. O. Jameson, The Prime Number Theorem, Camb. Univ. Press, 2003. [See also the review by D. M. Bressoud (link below).]
Władysław Narkiewicz, The Development of Prime Number Theory, Springer-Verlag, 2000.
József Sándor, Dragoslav S. Mitrinovic and Borislav Crstici, Handbook of Number Theory I, Springer Science & Business Media, 2005, Section VII.1. (For inequalities, etc.).
N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
Gerald Tenenbaum and Michel Mendès France, Prime Numbers and Their Distribution, AMS Providence RI, 1999.
V. Udrescu, Some remarks concerning the conjecture pi(x + y) <= pi(x) + pi(y). Math. Pures Appl. 20 (1975), 1201-1208.
LINKS
Daniel Forgues, Table of n, pi(n) for n = 1..100000 (first 20000 terms from N. J. A. Sloane; see below for links with 823852 terms (Verma) and more (Caldwell))
M. Abramowitz and I. A. Stegun, eds., Handbook of Mathematical Functions, National Bureau of Standards, Applied Math. Series 55, Tenth Printing, 1972 [alternative scanned copy].
Christian Axler, Über die Primzahl-Zählfunktion, die n-te Primzahl und verallgemeinerte Ramanujan-Primzahlen, Ph.D. thesis 2013, in German, English summary.
Paul T. Bateman and Harold G. Diamond, A Hundred Years of Prime Numbers, Amer. Math. Month., Vol. 103, No. 9 (Nov. 1996), pp. 729-741, MAA Washington DC.
Claudio Bonanno and Mirko S. Mega, Toward a dynamical model for prime numbers, Chaos, Solitons & Fractals, Vol. 20, No. 1 (2004), pp. 107-118; arXiv preprint, arXiv:cond-mat/0309251, 2003.
David M. Bressoud, Review of "The Prime Number Theorem" by G. J. O. Jameson, MAA Reviews, 2005. - from N. J. A. Sloane, Dec 29 2018
D. M. Bressoud and Stan Wagon, Computational Number Theory: Basic Algorithms, Springer/Key, 2000 (with a Mathematica package for computational number theory).
Jean-Marie de Koninck and Aleksandar Ivić, Topics in Arithmetical Functions: Asymptotic Formulae for Sums of Reciprocals of Arithmetical Functions and Related Fields, Amsterdam, Netherlands: North-Holland, 1980. See Chapter 9, p. 231.
Marc Deléglise, Computation of large values of pi(x), 1996.
Pierre Dusart, Autour de la fonction qui compte le nombre de nombres premiers, Thèse, Université de Limoges, France (1998).
Pierre Dusart, The k-th prime is greater than k(ln k + ln ln k-1) for k>=2, Mathematics of Computation, Vo. 68, No. 225 (1999), pp. 411-415.
Encyclopedia Britannica, The Prime Number Theorem [web.archive.org's copy of a no longer available personal copy of the Encyclopedia's article]
R. Gray and J. D. Mitchell, Largest subsemigroups of the full transformation monoid, Discrete Math., 308 (2008), 4801-4810.
G. H. Hardy and J. E. Littlewood, Contributions to the theory of the Riemann zeta-function and the theory of the distribution of primes, Acta Mathematica, Vol. 41 (1916), pp. 119-196.
G. H. Hardy and J. E. Littlewood, Some problems of 'Partitio numerorum'; III: On the expression of a number as a sum of primes, Acta Math., Vol. 44, No. 1 (1923), pp. 1-70.
Mehdi Hassani, Approximation of pi(x) by Psi(x), J. Inequ. Pure Appl. Math., Vol. 7, No. 1 (2006), Article #7.
Y.-C. Kim, Note on the Prime Number Theorem, arXiv:math/0502062 [math.NT], 2005.
Angel V. Kumchev, The Distribution of Prime Numbers, 2005.
J. C. Lagarias, V. S. Miller and A. M. Odlyzko, Computing pi(x): The Meissel-Lehmer method, Math. Comp., Vol. 44, No. 170 (1985), pp. 537-560.
Jeffrey C. Lagarias and Andrew M. Odlyzko, Computing pi(x): An analytic method, Journal of Algorithms, Vol. 8, No. 2 (1987), pp. 173-191; alternative link.
John Lorch, The Distribution of Primes, B.S. Undergraduate Mathematics Exchange, Vol. 3, No. 1 (Fall 2005).
Nathan McKenzie, Computing the Prime Counting Function with Linnik's Identity, personal blog, March 24, 2011.
Murat Baris Paksoy, Derived Ramanujan primes: R'_n, arXiv:1210.6991 [math.NT], 2012.
Bent E. Petersen, Prime Number Theorem, Seminar Lecture Note, 1996; version 2002-05-14.
Simon Plouffe, Approximations de séries génératrices et quelques conjectures, Dissertation, Université du Québec à Montréal, 1992; arXiv:0911.4975 [math.NT], 2009.
Simon Plouffe, 1031 Generating Functions, Appendix to Thesis, Montreal, 1992
Bernhard Riemann, On the Number of Prime Numbers, 1859, last page (various transcripts)
J. Barkley Rosser, Explicit Bounds for Some Functions of Prime Numbers, American Journal of Mathematics, Vol. 63, No. 1 (1941), pp. 211-232.
J. Barkley Rosser and Lowell Schoenfeld, Approximate formulas for some functions of prime numbers, Ill. Journ. Math. 6 (1962) 64-94.
J. Barkley Rosser and Lowell Schoenfeld, Approximate formulas for some functions of prime numbers (scan of some key pages from an ancient annotated photocopy).
Sebastian Martin Ruiz and Jonathan Sondow, Formulas for pi(n) and the n-th prime, arXiv:math/0210312 [math.NT], 2002, 2014.
Jonathan Sondow, Ramanujan Primes and Bertrand's Postulate, The American Mathematical Monthly, Vol. 116, No. 7 (2009), pp. 630-635; arXiv preprint, arXiv:0907.5232 [math.NT], 2009-2010.
Igor Turkanov, The prime counting function, arXiv:1603.02914 [math.NT], 2016.
Gaurav Verma and Srujan Sapkal, Table of n, pi(n) for n = 1..823852.
Eric Weisstein's World of Mathematics, Prime Counting Function.
Marek Wolf, Applications of Statistical Mechanics in Number Theory, Physica A, vol. 274, no. 2, 1999, pp. 149-157; 1999 preprint.
Wolfram Research, First 50 values of pi(n).
FORMULA
The prime number theorem gives the asymptotic expression a(n) ~ n/log(n).
For x > 1, pi(x) < (x / log x) * (1 + 3/(2 log x)). For x >= 59, pi(x) > (x / log x) * (1 + 1/(2 log x)). [Rosser and Schoenfeld]
For x >= 355991, pi(x) < (x / log(x)) * (1 + 1/log(x) + 2.51/(log(x))^2 ). For x >= 599, pi(x) > (x / log(x)) * (1 + 1/log(x)). [Dusart]
For x >= 55, x/(log(x) + 2) < pi(x) < x/(log(x) - 4). [Rosser]
For n > 1, A138194(n) <= a(n) <= A138195(n) (Tschebyscheff, 1850). - Reinhard Zumkeller, Mar 04 2008
For n >= 33, a(n) = 1 + Sum_{j=3..n} ((j-2)! - j*floor((j-2)!/j)) (Hardy and Wright); for n >= 1, a(n) = n - 1 + Sum_{j=2..n} (floor((2 - Sum_{i=1..j} (floor(j/i)-floor((j-1)/i)))/j)) (Ruiz and Sondow 2000). - Benoit Cloitre, Aug 31 2003
a(n) = A001221(A000142(n)). - Benoit Cloitre, Jun 03 2005
G.f.: Sum_{p prime} x^p/(1-x) = b(x)/(1-x), where b(x) is the g.f. for A010051. - Franklin T. Adams-Watters, Jun 15 2006
a(n) = A036234(n) - 1. - Jaroslav Krizek, Mar 23 2009
From Enrique Pérez Herrero, Jul 12 2010: (Start)
a(n) = Sum_{i=2..n} floor((i+1)/A000203(i)).
a(n) = Sum_{i=2..n} floor(A000010(n)/(i-1)).
a(n) = Sum_{i=2..n} floor(2/A000005(n)). (End)
Let pf(n) denote the set of prime factors of an integer n. Then a(n) = card(pf(n!/floor(n/2)!)). - Peter Luschny, Mar 13 2011
a(n) = -Sum_{p <= n} mu(p). - Wesley Ivan Hurt, Jan 04 2013
a(n) = (1/2)*Sum_{p <= n} (mu(p)*d(p)*sigma(p)*phi(p)) + sum_{p <= n} p^2. - Wesley Ivan Hurt, Jan 04 2013
a(1) = 0 and then, for all k >= 1, repeat k A001223(k) times. - Jean-Christophe Hervé, Oct 29 2013
a(n) = n/(log(n) - 1 - Sum_{k=1..m} A233824(k)/log(n)^k + O(1/log(n)^{m+1})) for m > 0. - Jonathan Sondow, Dec 19 2013
a(n) = A001221(A003418(n)). - Eric Desbiaux, May 01 2014
a(n) = Sum_{j=2..n} H(-sin^2 (Pi*(Gamma(j)+1)/j)) where H(x) is the Heaviside step function, taking H(0)=1. - Keshav Raghavan, Jun 18 2016
a(A014076(n)) = (1/2) * (A014076(n) + 1) - n + 1. - Christopher Heiling, Mar 03 2017
From Steven Foster Clark, Sep 25 2018: (Start)
a(n) = Sum_{m=1..n} A143519(m) * floor(n/m).
a(n) = Sum_{m=1..n} A001221(m) * A002321(floor(n/m)) where A002321() is the Mertens function.
a(n) = Sum_{m=1..n} |A143519(m)| * A002819(floor(n/m)) where A002819() is the Liouville Lambda summatory function and |x| is the absolute value of x.
a(n) = Sum_{m=1..n} A137851(m)/m * H(floor(n/m)) where H(n) = Sum_{m=1..n} 1/m is the harmonic number function.
a(n) = Sum_{m=1..log_2(n)} A008683(m) * A025528(floor(n^(1/m))) where A008683() is the Moebius mu function and A025528() is the prime-power counting function.
(End)
Sum_{k=2..n} 1/a(k) ~ (1/2) * log(n)^2 + O(log(n)) (de Koninck and Ivić, 1980). - Amiram Eldar, Mar 08 2021
a(n) ~ 1/(n^(1/n)-1). - Thomas Ordowski, Jan 30 2023
EXAMPLE
There are 3 primes <= 6, namely 2, 3 and 5, so pi(6) = 3.
MAPLE
with(numtheory); A000720 := pi; [ seq(A000720(i), i=1..50) ];
MATHEMATICA
A000720[n_] := PrimePi[n]; Table[ A000720[n], {n, 1, 100} ]
Array[ PrimePi[ # ]&, 100 ]
Accumulate[Table[Boole[PrimeQ[n]], {n, 100}]] (* Harvey P. Dale, Jan 17 2015 *)
PROG
(PARI) A000720=vector(100, n, omega(n!)) \\ For illustration only; better use A000720=primepi
(PARI) vector(300, j, primepi(j)) \\ Joerg Arndt, May 09 2008
(Sage) [prime_pi(n) for n in range(1, 79)] # Zerinvary Lajos, Jun 06 2009
(Magma) [ #PrimesUpTo(n): n in [1..200] ]; // Bruno Berselli, Jul 06 2011
(Haskell)
a000720 n = a000720_list !! (n-1)
a000720_list = scanl1 (+) a010051_list -- Reinhard Zumkeller, Sep 15 2011
(Python)
from sympy import primepi
for n in range(1, 100): print(primepi(n), end=', ') # Stefano Spezia, Nov 30 2018
CROSSREFS
Cf. A099802: Number of primes <= 2n.
Cf. A060715: Number of primes between n and 2n (exclusive).
Cf. A035250: Number of primes between n and 2n (inclusive).
Cf. A038107: Number of primes < n^2.
Cf. A014085: Number of primes between n^2 and (n+1)^2.
Cf. A007053: Number of primes <= 2^n.
Cf. A036378: Number of primes p between powers of 2, 2^n < p <= 2^(n+1).
Cf. A006880: Number of primes < 10^n.
Cf. A006879: Number of primes with n digits.
Cf. A033270: Number of odd primes <= n.
For lists of large values of a(n) see, e.g., A005669(n) = a(A002386(n)), A214935(n) = a(A205827(n)).
KEYWORD
nonn,core,easy,nice
EXTENSIONS
Additional links contributed by Lekraj Beedassy, Dec 23 2003
Edited by M. F. Hasler, Apr 27 2018 and (links recovered) Dec 21 2018
STATUS
approved
Ramanujan primes R_n: a(n) is the smallest number such that if x >= a(n), then pi(x) - pi(x/2) >= n, where pi(x) is the number of primes <= x.
+10
148
2, 11, 17, 29, 41, 47, 59, 67, 71, 97, 101, 107, 127, 149, 151, 167, 179, 181, 227, 229, 233, 239, 241, 263, 269, 281, 307, 311, 347, 349, 367, 373, 401, 409, 419, 431, 433, 439, 461, 487, 491, 503, 569, 571, 587, 593, 599, 601, 607, 641, 643, 647, 653, 659
OFFSET
1,1
COMMENTS
Referring to his proof of Bertrand's postulate, Ramanujan states a generalization: "From this we easily deduce that pi(x) - pi(x/2) >= 1, 2, 3, 4, 5, ..., if x >= 2, 11, 17, 29, 41, ..., respectively." Since the a(n) are prime (by their minimality), I call them "Ramanujan primes."
See the additional references and links mentioned in A143227.
2n log 2n < a(n) < 4n log 4n for n >= 1, and prime(2n) < a(n) < prime(4n) if n > 1. Also, a(n) ~ prime(2n) as n -> infinity.
Shanta Laishram has proved that a(n) < prime(3n) for all n >= 1.
a(n) - 3n log 3n is sometimes positive, but negative with increasing frequency as n grows since a(n) ~ 2n log 2n. There should be a constant m such that for n >= m we have a(n) < 3n log 3n.
A good approximation to a(n) = R_n for n in [1..1000] is A162996(n) = round(k*n * (log(k*n)+1)), with k = 2.216 determined empirically from the first 1000 Ramanujan primes, which approximates the {k*n}-th prime number which in turn approximates the n-th Ramanujan prime and where abs(A162996(n) - R_n) < 2 * sqrt(A162996(n)) for n in [1..1000]. Since R_n ~ prime(2n) ~ 2n * (log(2n)+1) ~ 2n * log(2n), while A162996(n) ~ prime(k*n) ~ k*n * (log(k*n)+1) ~ k*n * log(k*n), A162996(n) / R_n ~ k/2 = 2.216/2 = 1.108 which implies an asymptotic overestimate of about 10% (a better approximation would need k to depend on n and be asymptotic to 2). - Daniel Forgues, Jul 29 2009
Let p_n be the n-th prime. If p_n >= 3 is in the sequence, then all integers (p_n+1)/2, (p_n+3)/2, ..., (p_(n+1)-1)/2 are composite numbers. - Vladimir Shevelev, Aug 12 2009
Denote by q(n) the prime which is the nearest from the right to a(n)/2. Then there exists a prime between a(n) and 2q(n). Converse, generally speaking, is not true, i.e., there exist primes outside the sequence, but possess such property (e.g., 109). - Vladimir Shevelev, Aug 14 2009
The Mathematica program FasterRamanujanPrimeList uses Laishram's result that a(n) < prime(3n).
See sequence A164952 for a generalization we call a Ramanujan k-prime. - Vladimir Shevelev, Sep 01 2009
From Jonathan Sondow, May 22 2010: (Start)
About 46% of primes < 19000 are Ramanujan primes. About 78% of the lesser of twin primes < 19000 are Ramanujan primes.
About 15% of primes < 19000 are the lesser of twin primes. About 26% of Ramanujan primes < 19000 are the lesser of twin primes.
A reason for the jumps is in Section 7 of "Ramanujan primes and Bertrand's postulate" and in Section 4 of "Ramanujan Primes: Bounds, Runs, Twins, and Gaps". (See the arXiv link for a corrected version of Table 1.)
See Shapiro 2008 for an exposition of Ramanujan's proof of his generalization of Bertrand's postulate. (End)
The (10^n)-th R prime: 2, 97, 1439, 19403, 242057, 2916539, 34072993, 389433437, .... - Robert G. Wilson v, May 07 2011, updated Aug 02 2012
The number of R primes < 10^n: 1, 10, 72, 559, 4459, 36960, 316066, 2760321, .... - Robert G. Wilson v, Aug 02 2012
a(n) = R_n = R_{0.5,n} in "Generalized Ramanujan Primes."
All Ramanujan primes are in A164368. - Vladimir Shevelev, Aug 30 2011
If n tends to infinity, then limsup(a(n) - A080359(n-1)) = infinity; conjecture: also limsup(a(n) - A080359(n)) = infinity (cf. A182366). - Vladimir Shevelev, Apr 27 2012
Or the largest prime x such that the number of primes in (x/2,x] equals n. This equivalent definition underlines an important analogy between Ramanujan and Labos primes (cf. A080359). - Vladimir Shevelev, Apr 29 2012
Research questions on R_n - prime(2n) are at A233739, and on n-Ramanujan primes at A225907. - Jonathan Sondow, Dec 16 2013
The questions on R_n - prime(2n) in A233739 have been answered by Christian Axler in "On generalized Ramanujan primes". - Jonathan Sondow, Feb 13 2014
Srinivasan's Lemma (2014): prime(k-n) < prime(k)/2 if R_n = prime(k) and n > 1. Proof: By the minimality of R_n, the interval (prime(k)/2,prime(k)] contains exactly n primes and so prime(k-n) < prime(k)/2. - Jonathan Sondow, May 10 2014
For some n and k, we see that A168421(k) = a(n) so as to form a chain of primes similar to a Cunningham chain. For example (and the first example), A168421(2) = 7, links a(2) = 11 = A168421(3), links a(3) = 17 = A168421(4), links a(4) = 29 = A168421(6), links a(6) = 47. Note that the links do not have to be of a form like q = 2*p+1 or q = 2*p-1. - John W. Nicholson, Feb 22 2015
Extending Sondow's 2010 comments: About 48% of primes < 10^9 are Ramanujan primes. About 76% of the lesser of twin primes < 10^9 are Ramanujan primes. - Dana Jacobsen, Sep 06 2015
Sondow, Nicholson, and Noe's 2011 conjecture that pi(R_{m*n}) <= m*pi(R_n) for m >= 1 and n >= N_m (see A190413, A190414) was proved for n > 10^300 by Shichun Yang and Alain Togbé in 2015. - Jonathan Sondow, Dec 01 2015
Berliner, Dean, Hook, Marr, Mbirika, and McBee (2016) prove in Theorem 18 that the graph K_{m,n} is prime for n >= R_{m-1}-m; see A291465. - Jonathan Sondow, May 21 2017
Okhotin (2012) uses Ramanujan primes to prove Lemma 8 in "Unambiguous finite automata over a unary alphabet." - Jonathan Sondow, May 30 2017
Sepulcre and Vidal (2016) apply Ramanujan primes in Remark 9 of "On the non-isolation of the real projections of the zeros of exponential polynomials." - Jonathan Sondow, May 30 2017
Axler and Leßmann (2017) compute the first k-Ramanujan prime for k >= 1 + epsilon; see A277718, A277719, A290394. - Jonathan Sondow, Jul 30 2017
REFERENCES
Srinivasa Ramanujan, Collected Papers of Srinivasa Ramanujan (Ed. G. H. Hardy, S. Aiyar, P. Venkatesvara and B. M. Wilson), Amer. Math. Soc., Providence, 2000, pp. 208-209.
Harold N. Shapiro, Ramanujan's idea, Section 9.3B in Introduction to the Theory of Numbers, Dover, 2008.
LINKS
N. Amersi, O. Beckwith, S. J. Miller, R. Ronan, J. Sondow, Generalized Ramanujan primes, arXiv:1108.0475 [math.NT], 2011.
N. Amersi, O. Beckwith, S. J. Miller, R. Ronan, J. Sondow, Generalized Ramanujan primes, Combinatorial and Additive Number Theory, Springer Proc. in Math. & Stat., CANT 2011 and 2012, Vol. 101 (2014), 1-13.
Christian Axler, Über die Primzahl-Zählfunktion, die n-te Primzahl und verallgemeinerte Ramanujan-Primzahlen, Ph.D. thesis 2013, in German, English summary.
Christian Axler, On generalized Ramanujan primes, arXiv:1401.7179 [math.NT], 2014.
Christian Axler, On generalized Ramanujan primes, Ramanujan J. 39 (1) (2016) 1-30.
Christian Axler and Thomas Leßmann, An explicit upper bound for the first k-Ramanujan prime, arXiv:1504.05485 [math.NT], 2015.
Christian Axler and Thomas Leßmann, On the first k-Ramanujan prime, Amer. Math. Monthly, 124 (2017), 642-646.
Adam H. Berliner, N. Dean, J. Hook, A. Marr, A. Mbirika, C. McBee, Coprime and prime labelings of graphs, arXiv preprint arXiv:1604.07698 [math.CO], 2016; Journal of Integer Sequences, Vol. 19 (2016), #16.5.8.
Paul Erdős, A theorem of Sylvester and Schur, J. London Math. Soc., 9 (1934), 282-288.
Peter Hegarty, Why should one expect to find long runs of (non)-Ramanujan primes?, arXiv:1201.3847 [math.NT], 2012.
Ernest G. Hibbs, Component Interactions of the Prime Numbers, Ph. D. Thesis, Capitol Technology Univ. (2022), see p. 33.
Shanta Laishram, On a conjecture on Ramanujan primes, Int. J. Number Theory, 6 (2010), 1869-1873.
Catherine Lee, Minimum coprime graph labelings, arXiv:1907.12670 [math.CO], 2019.
Jaban Meher and M. Ram Murty, Ramanujan's proof of Bertrand's postulate, Amer. Math. Monthly, Vol. 120, No. 7 (2013), pp. 650-653.
Alexander Okhotin, Unambiguous finite automata over a unary alphabet, Inf. Comput., 212 (2012), 15-36.
Murat Baris Paksoy, Derived Ramanujan primes: R'_n, arXiv:1210.6991 [math.NT], 2012.
PlanetMath, Ramanujan prime
Srinivasa Ramanujan, A proof of Bertrand's postulate, J. Indian Math. Soc., 11 (1919), 181-182.
Juan Matias Sepulcre and Tomás Vidal, On the non-isolation of the real projections of the zeros of exponential polynomials, J. Math. Anal. Appl., 437 (2016) No. 1, 513-525.
Vladimir Shevelev, On critical small intervals containing primes, arXiv:0908.2319 [math.NT], 2009.
Vladimir Shevelev, Ramanujan and Labos primes, their generalizations and classifications of primes, arXiv:0909.0715 [math.NT], 2009-2011.
Vladimir Shevelev, Ramanujan and Labos primes, their generalizations, and classifications of primes, J. Integer Seq. 15 (2012) Article 12.5.4
Vladimir Shevelev, Charles R. Greathouse IV, Peter J. C. Moses, On intervals (kn, (k+1)n) containing a prime for all n>1, Journal of Integer Sequences, Vol. 16 (2013), Article 13.7.3. arXiv:1212.2785
Jonathan Sondow, Ramanujan primes and Bertrand's postulate, arXiv:0907.5232 [math.NT], 2009-2010.
Jonathan Sondow, Ramanujan primes and Bertrand's postulate, Amer. Math. Monthly, 116 (2009), 630-635. Zentralblatt review.
Jonathan Sondow, J. W. Nicholson, and T. D. Noe, Ramanujan Primes: Bounds, Runs, Twins, and Gaps, arXiv:1105.2249 [math.NT] 2011; J. Integer Seq. 14 (2011) Article 11.6.2.
Jonathan Sondow, Ramanujan Prime, Eric Weisstein's MathWorld.
Jonathan Sondow and E. Weisstein, Bertrand's Postulate, MathWorld.
Anitha Srinivasan, An upper bound for Ramanujan primes, Integers, 14 (2014), #A19.
Anitha Srinivasan and John W. Nicholson, An improved upper bound for Ramanujan primes, Integers, 15 (2015), #A52.
Wikipedia, Ramanujan prime.
Shichun Yang and Alain Togbé, On the estimates of the upper and lower bounds of Ramanujan primes, Ramanujan J., online 14 August 2015, 1-11.
FORMULA
a(n) = 1 + max{k: pi(k) - pi(k/2) = n - 1}.
a(n) = A080360(n-1) + 1 for n > 1.
a(n) >= A080359(n). - Vladimir Shevelev, Aug 20 2009
A193761(n) <= a(n) <= A193880(n).
a(n) = 2*A084140(n) - 1, for n > 1. - Jonathan Sondow, Dec 21 2012
a(n) = prime(2n) + A233739(n) = (A233822(n) + a(n+1))/2. - Jonathan Sondow, Dec 16 2013
a(n) = max{prime p: pi(p) - pi(p/2) = n} (see Shevelev 2012). - Jonathan Sondow, Mar 23 2016
a(n) = A000040(A179196(n)). - R. J. Mathar, Sep 21 2017
Sum_{n>=1} (-1)^(n+1)/a(n) = A190303. - Amiram Eldar, Nov 20 2020
EXAMPLE
a(1) = 2 is Bertrand's postulate: pi(x) - pi(x/2) >= 1 for all x >= 2.
a(2) = 11 because a(2) < 8 log 8 < 17 and pi(n) - pi(n/2) > 1 for n = 16, 15, ..., 11 but pi(10) - pi(5) = 1.
Consider a(9)=71. Then the nearest prime > 71/2 is 37, and between a(9) and 2*37, that is, between 71 and 74, there exists a prime (73). - Vladimir Shevelev, Aug 14 2009 [corrected by Jonathan Sondow, Jun 17 2013]
MAPLE
A104272 := proc(n::integer)
local R;
if n = 1 then
return 2;
end if;
R := ithprime(3*n-1) ; # upper limit Laishram's thrm Thrm 3 arXiv:1105.2249
while true do
if A056171(R) = n then # Defn. 1. of Shevelev JIS 14 (2012) 12.1.1
return R ;
end if;
R := prevprime(R) ;
end do:
end proc:
seq(A104272(n), n=1..200) ; # slow downstream search <= p(3n-1) R. J. Mathar, Sep 21 2017
MATHEMATICA
(RamanujanPrimeList[n_] := With[{T=Table[{k, PrimePi[k]-PrimePi[k/2]}, {k, Ceiling[N[4*n*Log[4*n]]]}]}, Table[1+First[Last[Select[T, Last[ # ]==i-1&]]], {i, 1, n}]]; RamanujanPrimeList[54]) (* Jonathan Sondow, Aug 15 2009 *)
(FasterRamanujanPrimeList[n_] := With[{T=Table[{k, PrimePi[k]-PrimePi[k/2]}, {k, Prime[3*n]}]}, Table[1+First[Last[Select[T, Last[ # ]==i-1&]]], {i, 1, n}]]; FasterRamanujanPrimeList[54])
nn=1000; R=Table[0, {nn}]; s=0; Do[If[PrimeQ[k], s++]; If[PrimeQ[k/2], s--]; If[s<nn, R[[s+1]]=k], {k, Prime[3*nn]}]; R=R+1 (* T. D. Noe, Nov 15 2010 *)
PROG
(Perl) use ntheory ":all"; my $r = ramanujan_primes(1000); say "[@$r]"; # Dana Jacobsen, Sep 06 2015
(PARI) ramanujan_prime_list(n) = {my(L=vector(n), s=0, k=1); for(k=1, prime(3*n)-1, if(isprime(k), s++); if(k%2==0 && isprime(k/2), s--); if(s<n, L[s+1] = k+1)); L} \\ Satish Bysany, Mar 02 2017
CROSSREFS
Cf. A006992 (Bertrand primes), A056171 (pi(n) - pi(n/2)).
Cf. A162996 (Round(kn * (log(kn)+1)), with k = 2.216 as an approximation of R_n = n-th Ramanujan Prime).
Cf. A163160 (Round(kn * (log(kn)+1)) - R_n, where k = 2.216 and R_n = n-th Ramanujan prime).
Cf. A178127 (Lesser of twin Ramanujan primes), A178128 (Lesser of twin primes if it is a Ramanujan prime).
Cf. A181671 (number of Ramanujan primes less than 10^n).
Cf. A174635 (non-Ramanujan primes), A174602, A174641 (runs of Ramanujan and non-Ramanujan primes).
Cf. A189993, A189994 (lengths of longest runs).
Cf. A190124 (constant of summation: 1/a(n)^2).
Cf. A192820 (2- or derived Ramanujan primes R'_n), A192821, A192822, A192823, A192824, A225907.
Cf. A193761 (0.25-Ramanujan primes), A193880 (0.75-Ramanujan primes).
Cf. A185004 - A185007 ("modular" Ramanujan primes).
Not to be confused with the Ramanujan numbers or Ramanujan tau function, A000594.
KEYWORD
nonn,nice
AUTHOR
Jonathan Sondow, Feb 27 2005
STATUS
approved
Number of primes between n^2 and (n+1)^2.
+10
114
0, 2, 2, 2, 3, 2, 4, 3, 4, 3, 5, 4, 5, 5, 4, 6, 7, 5, 6, 6, 7, 7, 7, 6, 9, 8, 7, 8, 9, 8, 8, 10, 9, 10, 9, 10, 9, 9, 12, 11, 12, 11, 9, 12, 11, 13, 10, 13, 15, 10, 11, 15, 16, 12, 13, 11, 12, 17, 13, 16, 16, 13, 17, 15, 14, 16, 15, 15, 17, 13, 21, 15, 15, 17, 17, 18, 22, 14, 18, 23, 13
OFFSET
0,2
COMMENTS
Suggested by Legendre's conjecture (still open) that for n > 0 there is always a prime between n^2 and (n+1)^2.
a(n) is the number of occurrences of n in A000006. - Philippe Deléham, Dec 17 2003
See the additional references and links mentioned in A143227. - Jonathan Sondow, Aug 03 2008
Legendre's conjecture may be written pi((n+1)^2) - pi(n^2) > 0 for all positive n, where pi(n) = A000720(n), [the prime counting function]. - Jonathan Vos Post, Jul 30 2008 [Comment corrected by Jonathan Sondow, Aug 15 2008]
Legendre's conjecture can be generalized as follows: for all integers n > 0 and all real numbers k > K, there is a prime in the range n^k to (n+1)^k. The constant K is conjectured to be log(127)/log(16). See A143935. - T. D. Noe, Sep 05 2008
For n > 0: number of occurrences of n^2 in A145445. - Reinhard Zumkeller, Jul 25 2014
REFERENCES
J. R. Goldman, The Queen of Mathematics, 1998, p. 82.
LINKS
Pierre Dusart, The k-th prime is greater than k(ln k + ln ln k-1) for k>=2, Mathematics of Computation 68: (1999), 411-415.
Tsutomu 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.
Edmund Landau, Gelöste und ungelöste Probleme aus der Theorie der Primzahlverteilung und der Riemannschen Zetafunktion. Jahresbericht der Deutschen Mathematiker-Vereinigung (1912), Vol. 21, page 208-228.
Michael Penn, Legendre's Conjecture is probably true, and here's why, YouTube video, 2023.
Eric Weisstein's World of Mathematics, Legendre's Conjecture
FORMULA
a(n) = A000720((n+1)^2) - A000720(n^2). - Jonathan Vos Post, Jul 30 2008
a(n) = Sum_{k = n^2..(n+1)^2} A010051(k). - Reinhard Zumkeller, Mar 18 2012
Conjecture: for all n>1, abs(a(n)-(n/log(n))) < sqrt(n). - Alain Rocchelli, Sep 20 2023
EXAMPLE
a(17) = 5 because between 17^2 and 18^2, i.e., 289 and 324, there are 5 primes (which are 293, 307, 311, 313, 317).
MATHEMATICA
Table[PrimePi[(n + 1)^2] - PrimePi[n^2], {n, 0, 80}] (* Lei Zhou, Dec 01 2005 *)
Differences[PrimePi[Range[0, 90]^2]] (* Harvey P. Dale, Nov 25 2015 *)
PROG
(PARI) a(n)=primepi((n+1)^2)-primepi(n^2) \\ Charles R Greathouse IV, Jun 15 2011
(Haskell)
a014085 n = sum $ map a010051 [n^2..(n+1)^2]
-- Reinhard Zumkeller, Mar 18 2012
(Python)
from sympy import primepi
def a(n): return primepi((n+1)**2) - primepi(n**2)
print([a(n) for n in range(81)]) # Michael S. Branicky, Jul 05 2021
CROSSREFS
First differences of A038107.
Counts of primes between consecutive higher powers: A060199, A061235, A062517.
KEYWORD
nonn,nice
AUTHOR
Jon Wild, Jul 14 1997
STATUS
approved
Number of primes between n and 2n exclusive.
+10
47
0, 1, 1, 2, 1, 2, 2, 2, 3, 4, 3, 4, 3, 3, 4, 5, 4, 4, 4, 4, 5, 6, 5, 6, 6, 6, 7, 7, 6, 7, 7, 7, 7, 8, 8, 9, 9, 9, 9, 10, 9, 10, 9, 9, 10, 10, 9, 9, 10, 10, 11, 12, 11, 12, 13, 13, 14, 14, 13, 13, 12, 12, 12, 13, 13, 14, 13, 13, 14, 15, 14, 14, 13, 13, 14, 15, 15
OFFSET
1,4
COMMENTS
See the additional references and links mentioned in A143227. - Jonathan Sondow, Aug 03 2008
a(A060756(n)) = n and a(m) <> n for m < A060756(n). - Reinhard Zumkeller, Jan 08 2012
For prime n conjecturally a(n) = A226859(n). - Vladimir Shevelev, Jun 27 2013
The number of partitions of 2n+2 into exactly two parts where the first part is a prime strictly less than 2n+1. - Wesley Ivan Hurt, Aug 21 2013
REFERENCES
M. Aigner and C. M. Ziegler, Proofs from The Book, Chapter 2, Springer NY 2001.
LINKS
C. K. Caldwell, The Prime Glossary, Bertrand's postulate
R. Chapman, Bertrand postulate [Broken link]
Math Olympiads, Bertrand's Postulate [Broken link]
S. Ramanujan, A proof of Bertrand's postulate, J. Indian Math. Soc., 11 (1919), 181-182.
Vladimir Shevelev, Ramanujan and Labos Primes, Their Generalizations, and Classifications of Primes, Journal of Integer Sequences, Vol. 15 (2012), Article 12.5.4
M. Slone, PlanetMath.org, Proof of Bertrand's conjecture
Jonathan Sondow and Eric Weisstein, Bertrand's Postulate, World of Mathematics
Dr. Wilkinson, The Math Forum, Erdos' Proof
Wolfram Research, Bertrand hypothesis
FORMULA
a(n) = Sum_{k=1..n-1} A010051(n+k). - Reinhard Zumkeller, Dec 03 2009
a(n) = pi(2n-1) - pi(n). - Wesley Ivan Hurt, Aug 21 2013
a(n) = Sum_{k=(n^2-n+2)/2..(n^2+n-2)/2} A010051(A128076(k)). - Wesley Ivan Hurt, Jan 08 2022
EXAMPLE
a(35)=8 since eight consecutive primes (37,41,43,47,53,59,61,67) are located between 35 and 70.
MAPLE
a := proc(n) local counter, i; counter := 0; from i from n+1 to 2*n-1 do if isprime(i) then counter := counter +1; fi; od; return counter; end:
with(numtheory); seq(pi(2*k-1)-pi(k), k=1..100); # Wesley Ivan Hurt, Aug 21 2013
MATHEMATICA
a[n_]:=PrimePi[2n-1]-PrimePi[n]; Table[a[n], {n, 1, 84}] (* Jean-François Alcover, Mar 20 2011 *)
PROG
(PARI) { for (n=1, 1000, write("b060715.txt", n, " ", primepi(2*n - 1) - primepi(n)); ) } \\ Harry J. Smith, Jul 10 2009
(Haskell)
a060715 n = sum $ map a010051 [n+1..2*n-1] -- Reinhard Zumkeller, Jan 08 2012
(Magma) [0] cat [#PrimesInInterval(n+1, 2*n-1): n in [2..80]]; // Bruno Berselli, Sep 05 2012
(Python) from sympy import primerange as pr
def A060715(n): return len(list(pr(n+1, 2*n))) # Karl-Heinz Hofmann, May 05 2022
KEYWORD
nonn,easy
AUTHOR
Lekraj Beedassy, Apr 25 2001
EXTENSIONS
Corrected by Dug Eichelberger (dug(AT)mit.edu), Jun 04 2001
More terms from Larry Reeves (larryr(AT)acm.org), Jun 05 2001
STATUS
approved
a(n) = pi(n) - pi(floor(n/2)), where pi is A000720.
+10
26
0, 1, 2, 1, 2, 1, 2, 2, 2, 1, 2, 2, 3, 2, 2, 2, 3, 3, 4, 4, 4, 3, 4, 4, 4, 3, 3, 3, 4, 4, 5, 5, 5, 4, 4, 4, 5, 4, 4, 4, 5, 5, 6, 6, 6, 5, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 6, 7, 7, 8, 7, 7, 7, 7, 7, 8, 8, 8, 8, 9, 9, 10, 9, 9, 9, 9, 9, 10, 10, 10, 9, 10, 10, 10, 9, 9, 9, 10, 10, 10, 10, 10, 9, 9, 9, 10, 10
OFFSET
1,3
COMMENTS
Also, the number of unitary prime divisors of n!. A prime divisor of n is unitary iff its exponent is 1 in the prime power factorization of n. In general, gcd(p, n/p) = 1 or p. Here we count the cases when gcd(p, n/p) = 1.
A unitary prime divisor of n! is >= n/2, hence their number is pi(n) - pi(n/2). - Peter Luschny, Mar 13 2011
See also the references and links mentioned in A143227. - Jonathan Sondow, Aug 03 2008
From Robert G. Wilson v, Mar 20 2017: (Start)
First occurrence of k is at n = A080359(k).
The last occurrence of k is at n = A080360(k).
The number of times k appears is A080362(k). (End)
Lev Schnirelmann proved that for every n, a(n) > (1/log_2(n))*(n/3 - 4*sqrt(n)) - 1 - (3/2)*log_2(n). - Arkadiusz Wesolowski, Nov 03 2017
LINKS
Ethan Berkove and Michael Brilleslyper, Subgraphs of Coprime Graphs on Sets of Consecutive Integers, Integers, Vol. 22 (2022), #A47, see p. 8.
FORMULA
a(n) = A000720(n) - A056172(n). - Robert G. Wilson v, Apr 09 2017
a(n) = A056169(n!). - Amiram Eldar, Jul 24 2024
EXAMPLE
10! = 2^8 * 3^2 * 5^2 * 7. The only unitary prime divisor is 7, so a(10) = 1.
MAPLE
A056171 := proc(x)
numtheory[pi](x)-numtheory[pi](floor(x/2)) ;
end proc:
seq(A056171(n), n=1..130) ; # N. J. A. Sloane, Sep 01 2015
A056171 := n -> nops(select(isprime, [$iquo(n, 2)+1..n])):
seq(A056171(i), i=1..98); # Peter Luschny, Mar 13 2011
MATHEMATICA
s=0; Table[If[PrimeQ[k], s++]; If[PrimeQ[k/2], s--]; s, {k, 100}]
Table[PrimePi[n]-PrimePi[Floor[n/2]], {n, 100}] (* Harvey P. Dale, Sep 01 2015 *)
PROG
(PARI) A056171=n->primepi(n)-primepi(n\2) \\ M. F. Hasler, Dec 31 2016
(Python)
from sympy import primepi
[primepi(n) - primepi(n//2) for n in range(1, 151)] # Indranil Ghosh, Mar 22 2017
KEYWORD
nonn,easy
AUTHOR
Labos Elemer, Jul 27 2000
EXTENSIONS
Definition simplified by N. J. A. Sloane, Sep 01 2015
STATUS
approved
(Number of primes between n and 2n) - (number of primes between n^2 and (n+1)^2), if > 0.
+10
11
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,2
COMMENTS
If the sequence is bounded (e.g., if it is finite), then Legendre's conjecture is true: there is always a prime between n^2 and (n+1)^2, at least for all sufficiently large n. This follows from the strong form of Bertrand's postulate proved by Ramanujan (see A104272 Ramanujan primes).
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
M. Hassani, Counting primes in the interval (n^2,(n+1)^2), arXiv:math/0607096 [math.NT], 2006.
S. Ramanujan, A proof of Bertrand's postulate, J. Indian Math. Soc., 11 (1919), 181-182.
J. Sondow and E. W. Weisstein, Bertrand's Postulate in MathWorld
FORMULA
a(n) = |A143223(A143226(n))|.
EXAMPLE
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.
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 *)
CROSSREFS
Cf. A000720, A014085, A060715, A104272, A143223, A143224, A143225, A143226 = corresponding values of n.
KEYWORD
nonn
AUTHOR
Jonathan Sondow, Aug 02 2008
STATUS
approved
Numbers n such that (number of primes between n^2 and (n+1)^2) = (number of primes between n and 2n).
+10
10
0, 9, 36, 37, 46, 49, 85, 102, 107, 118, 122, 127, 129, 140, 157, 184, 194, 216, 228, 360, 365, 377, 378, 406, 416, 487, 511, 571, 609, 614, 672, 733, 767, 806, 813, 863, 869, 916, 923, 950, 978, 988, 1249, 1279, 1280, 1385, 1427, 1437, 1483, 1539, 1551, 1690
OFFSET
1,2
COMMENTS
The sequence gives the positions of zeros in A143223. The number of primes in question is A143225(n).
Legendre's conjecture (still open) says there is always a prime between n^2 and (n+1)^2. Bertrand's postulate (actually a theorem due to Chebyshev) says there is always a prime between n and 2n.
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. [Jonathan Sondow, Aug 03 2008]
LINKS
T. D. Noe, Table of n, a(n) for n=1..97 (no other n < 10^6)
M. Hassani, Counting primes in the interval (n^2,(n+1)^2), arXiv:math/0607096 [math.NT], 2006.
S. Ramanujan, A proof of Bertrand's postulate, J. Indian Math. Soc., 11 (1919), 181-182.
J. Sondow and E. W. Weisstein, Bertrand's Postulate in MathWorld.
Eric Weisstein's World of Mathematics, Legendre's Conjecture.
FORMULA
A143223(a(n)) = 0.
EXAMPLE
There is the same number of primes (namely 3) between 9^2 and 10^2 as between 9 and 2*9, so 9 is a term.
MAPLE
with(numtheory): A143224:=n->`if`(pi((n+1)^2)-pi(n^2) = pi(2*n)-pi(n), n, NULL): seq(A143224(n), n=0..2000); # Wesley Ivan Hurt, Jul 25 2017
MATHEMATICA
L={}; Do[If[PrimePi[(n+1)^2]-PrimePi[n^2] == PrimePi[2n]-PrimePi[n], L=Append[L, n]], {n, 0, 2000}]; L
(* Second program *)
With[{nn = 2000}, {0}~Join~Position[#, {0}][[All, 1]] &@ Map[Differences, Transpose@ {Differences@ Array[PrimePi[#^2] &, nn], Array[PrimePi[2 #] - PrimePi[#] &, nn - 1]}]] (* Michael De Vlieger, Jul 25 2017 *)
PROG
(PARI) is(n) = primepi((n+1)^2)-primepi(n^2)==primepi(2*n)-primepi(n) \\ Felix Fröhlich, Jul 25 2017
CROSSREFS
KEYWORD
nonn
AUTHOR
Jonathan Sondow, Jul 31 2008
STATUS
approved
Number of primes between n^2 and (n+1)^2, if equal to the number of primes between n and 2n.
+10
10
0, 3, 9, 9, 10, 10, 16, 20, 19, 21, 23, 23, 24, 25, 28, 31, 32, 36, 38, 56, 57, 59, 59, 62, 65, 71, 75, 84, 88, 88, 96, 102, 107, 115, 116, 119, 120, 126, 125, 129, 132, 132, 163, 168, 168, 182, 189, 189, 192, 197, 198, 213, 236
OFFSET
1,2
COMMENTS
Legendre's conjecture (still open) says there is always a prime between n^2 and (n+1)^2. Bertrand's postulate (actually a theorem due to Chebyshev) says there is always a prime between n and 2n.
See the additional reference and link to Ramanujan's work mentioned in A143223. [Jonathan Sondow, Aug 03 2008]
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.
LINKS
T. D. Noe, Table of n, a(n) for n=1..97 (no other n < 10^6)
M. Hassani, Counting primes in the interval (n^2,(n+1)^2), arXiv:math/0607096 [math.NT], 2006.
S. Ramanujan, A proof of Bertrand's postulate, J. Indian Math. Soc., 11 (1919), 181-182.
J. Sondow and E. W. Weisstein, Bertrand's Postulate in MathWorld
FORMULA
a(n) = A014085(A143224(n)) = A060715(A143224(n)) for n > 0.
EXAMPLE
There are 3 primes between 9^2 and 10^2 and 3 primes between 9 and 2*9, so 3 is a member.
MATHEMATICA
L={}; Do[If[PrimePi[(n+1)^2]-PrimePi[n^2] == PrimePi[2n]-PrimePi[n], L=Append[L, PrimePi[2n]-PrimePi[n]]], {n, 0, 2000}]; L
CROSSREFS
KEYWORD
nonn
AUTHOR
Jonathan Sondow, Jul 31 2008
STATUS
approved
Numbers n such that there are more primes between n and 2n than between n^2 and (n+1)^2.
+10
10
42, 55, 56, 58, 69, 77, 80, 119, 136, 137, 143, 145, 149, 156, 174, 177, 178, 188, 219, 225, 232, 247, 253, 254, 257, 261, 263, 297, 306, 310, 325, 327, 331, 335, 339, 341, 344, 356, 379, 395, 402, 410, 418, 421, 425, 433, 451, 485, 500
OFFSET
1,1
COMMENTS
Legendre's conjecture (still open) says there is always a prime between n^2 and (n+1)^2. Bertrand's postulate (actually a theorem due to Chebyshev) says there is always a prime between n and 2n.
It appears that this sequence is finite; searching up to 10^5, the last n appears to be 48717. [T. D. Noe, Aug 01 2008]
If the sequence is finite, then, by Bertrand's postulate, Legendre's conjecture is true for sufficiently large n. - Jonathan Sondow, Aug 02 2008
No other n <= 10^6. The plot of A143223 shows that it is quite likely that there are no additional terms. - T. D. Noe, Aug 04 2008
See the additional reference and link to Ramanujan's work mentioned in A143223. - Jonathan Sondow, Aug 03 2008
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.
LINKS
M. Hassani, Counting primes in the interval (n^2,(n+1)^2), arXiv:math/0607096 [math.NT], 2006.
S. Ramanujan, A proof of Bertrand's postulate, J. Indian Math. Soc., 11 (1919), 181-182.
J. Sondow and E. W. Weisstein, Bertrand's Postulate in MathWorld
FORMULA
A143223(n) < 0.
EXAMPLE
There are 10 primes between 42 and 2*42, but only 9 primes between 42^2 and 43^2, so 42 is a member.
MATHEMATICA
L={}; Do[If[PrimePi[(n+1)^2]-PrimePi[n^2] < PrimePi[2n]-PrimePi[n], L=Append[L, n]], {n, 0, 500}]; L
KEYWORD
nonn
AUTHOR
Jonathan Sondow, Jul 31 2008
STATUS
approved

Search completed in 0.018 seconds