Talk:Prime number theorem

message: Do not write log\ x.  That looks like this:
:log\ x.
Instead write \log x.  That looks like this:
:\log x.\,
Use of backslashes in \log, \exp, \sin, \cos, \max, \min, \det, \lim, \sup, \inf and a number of other math operators has at least three effects:
* log and the like don't get italicized as if they were variables;
* proper spacing is automatic.  How much space is needed depends on the context, but all of the standard conventions in this regard are built in to the TeX software;
* in some cases, e.g., \lim, \max, etc., the supscript will appear directly below the operator, rather than below and to the right, thus:
::\max_{x>0} f(x).\,
::\lim_{x\to 0} f(x).\,
Michael Hardy 23:02, 21 Jun 2005 (UTC)
replies: text: Thanks, I'm the one that used log\.  (I started with TeX less than a week ago.) Bubba73 23:51, 21 Jun 2005 (UTC)
thread_title: Correct [[TeX]]

message: The 1999 Dusart paper gives stronger asymptotic bounds than that given.
Article:
p_k\ge k(\ln k+\ln\ln k-1),k\ge2
On p. 414 §4:
p_k\ge k\left(\ln k+\ln\ln k-1+\frac{\ln\ln k-2.25}{\ln k}\right),k\ge2
The article's result is correct, but the latter result is stronger for k > 13197.  I'm choosing to leave this off because the extra complexity isn't needed here, but if someone feels it's worthwhile they can add it.
At the moment I'm trying to read his thesis Autour de la fonction qui compte le nombre de nombres premiers to see if there are any other results along these lines.  My French isn't very good, but I'll see what I can find.  Pages 30–32 cover it, so I just have a bit to wade through. CRGreathouse 11:50, 25 May 2006 (UTC)
replies: text: Another interesting improvement, given in arxiv:1002.0442, is the lower bound π(x) ≥ (x / ln x)(1  + 1 / ln x + 2 / ln² x). — MFH:Talk 00:43, 23 March 2023 (UTC)
thread_title: Dusart

message: The first sentence in the section is, "Here is a table that shows how the three functions π(x), x / ln x and Li(x) compare:" but the table does not have any column labeled "x/ln(x)" nor "Li(x)". 
Am I expected to solve the equations at the top of the columns to determine which column is "x/ln(x)" and which is "Li(x)" ?!?  
OR is there a mistake in that sentence?
Nwbeeson 21:20, 30 January 2007 (UTC)
replies: text: x/ln(x) and Li(x) are not shown. The interesting thing is their difference to pi(x) so only that is shown. I modified the explanation. PrimeHunter 00:18, 31 January 2007 (UTC)
replies: text: Sorry for resurrecting an old discussion. While x/ln(x) is certainly significant, wouldn't "x/(ln(x)-1)" be more so, since it is significantly closer to (x) than x/ln(x) is? Glenn L (talk) 01:16, 24 July 2013 (UTC)
replies: text: x/ln(x) is by far the most famous approximation, it's the "simplest" approximation which is asymptotically correct, and it's used in the prime number theorem, the subject of this article, so replacing it would be odd. x/(ln(x)-1) is closer than x/ln(x) for the small numbers listed here but far from as close as li(x) which is also listed. Note: 1/ln(x) is better than 1/(ln(x)-1) for approximating the chance that a random x is prime. But when counting all primes below x for a relatively small value like 1024, x/ln(x) suffers from many numbers being so much below x that the primality chance drops significantly. x/(ln(x)-1) is a way to compensate for this drop without needing the more "advanced" function li(x). PrimeHunter (talk) 02:09, 24 July 2013 (UTC)
thread_title: Table of π(x), x / ln x, and Li(x)

message: I just restored the relative error formulation of the theorem, since that seems to me to be the most intuitively accessible. Clearly, lim f(x)/g(x) = 1 is equivalent to lim |g(x) - f(x)| / |f(x)| = 0, and the latter is the relative error. AxelBoldt 16:38, 4 April 2007 (UTC)
thread_title:  Relative error language 

message: According to the introductory paragraph:
1. The PNT states that the frequency of primes near x approximates \frac{1}{\ln x}.
According to the "statement of the theorem" subsection:
2. The PNT states that the total number of primes less than x approximates \frac{x}{\ln x}.
A solid high school math student should be able to prove that 2 is equivalent to:
2A. The PNT states that the frequency of primes between 0 and x approximates \frac{1}{\ln x}.
But proving that 2A and 1 are equivalent is certainly beyond a lot of college math students.  Moreover, it requires facts about logarithms that are irrelevant to this page.  (By way of comparison, the average value of \sin x between 0 and x tends to zero, but the average value of \sin x near x does not approach any limit.  In other words, frequency near x and frequency between 0 and x are not necessarily equal, although they are equal in this case.)
So why the discrepancy?  Yes, I know that some of the editors prefer to state the theorem as 1 and others prefer to state it as 2.  But defining the theorem one way, and then suddenly redefining it another way, without saying why they are equivalent, would be inappropriate even in a math textbook -- not to mention on Wikipedia, which presumably has an audience beyond math graduate students.
(To be honest, I suspect that very few high school students could even prove that 2 and 2A are equivalent, because they simply are unable to write a proof, period.) — Lawrence King (talk) 07:51, 23 November 2007 (UTC)
replies: text: Well, since Li(x) is a better approximation in general than x/log(x) to the number of primes up to x, I suppose #1 is the 'best' statement of the three.  I would prefer to include at least 1 and (2 OR 2a), with OR in its usual inclusive sense, but with some mention that the two (three) imply each other.  CRGreathouse (t | c) 07:57, 23 November 2007 (UTC)
replies: text:  That sounds great to me.  I think it is perfectly fine to have multiple equivalent statements of a theorem, as long as the Wikipedia page states the fact that these are equivalent.  We don't even need to explain why they are equivalent, as long as we state it.  Without that statement, however, it's as if the Mark Twain page had a subsection describing the life of Samuel Clemens, without ever mentioning the connection between the two. — Lawrence King (talk) 22:04, 23 November 2007 (UTC)
thread_title:  First paragraph and first subsection are too different 

message: comparing table this article cs that for Prime-counting function, there are differences, I do not know which is correct.   For example, at 10E23, one lists 1,925,320,391,606,818,006,727  versus 	1,925,320,391,606,803,968,923 in the other ...--Billymac00 (talk) 03:38, 28 May 2008 (UTC)
replies: text: Good catch, I fixed it.  1,925,320,391,606,803,968,923 is correct (well, ±1 anyway). CRGreathouse (t | c) 13:17, 28 May 2008 (UTC)

text: Wow, that went back to the beginning of the table in 2005:  CRGreathouse (t | c) 13:32, 28 May 2008 (UTC)
replies: text: The problem is disagreeing computations.  made two computations in or before 2001 and got 1925320391606818006727 (the old number in this article) in the first, and 1925320391606819893167-1886441 (1 less) in the second. They apparently never found the cause of the difference and didn't publish an "official" count. Silva's tables at  reported 1925320391606803968923 (14037803 less) around 6 years later. As far as I know there has been no independent verification but Silva's count is now accepted by major sites like MathWorld, Prime Pages and OEIS (some of which listed the old count ealier), so it makes sense for us to also accept it. PrimeHunter (talk) 21:57, 28 May 2008 (UTC)
replies: text:  Yes, I really should have explained that here.  I came to the same conclusion.  Actually, that might be worth mentioning in the article itself. CRGreathouse (t | c) 14:15, 29 May 2008 (UTC)
thread_title:  Errata? 

message: Kudos to whoever the main writer was on this article. As an interested non-mathematician, I found it refreshingly clear and well-written.  —Preceding unsigned comment added by 128.125.52.176 (talk) 22:33, 17 March 2009 (UTC)
replies: text: At the moment, 2019, it has been written by 360 editors. I am not sure any one of them is the main editor.  — Preceding unsigned comment added by 2A00:23C4:7CA2:A401:4D0F:322:B337:EC52 (talk) 16:14, 10 July 2019 (UTC)
thread_title:  Beautifully written article 

message: The second paragraph is roughly speaking indeed! The PNT, as stated, is a limit (or asymptotic) result. As such, by elementary properties of limits, it carries no information at all about any finite part of the 'sequence' that leads to it. The PNT does not tell you ANYTHING about any specified value of x. Of course, we know from other sources (like the inequalities stated) that 1/ln(x) is a plausible estimate for the prime density, but that does not come directly from the classical form of the PNT.
Incidentally, if you know what it means to pick an integer at random please let me know! If I pick 10 integers at random what is their expected mean? Try infinity. (I'm assuming that you are thinking of a uniform distribution.) It's a form of words that we often use casually (as in: probability of two randomly chosen positive integers being coprime is 6/pi^2) but it doesn't make a lot of sense unless embedded in a limiting process.
Jpulham (talk) 15:40, 7 November 2009 (UTC)
thread_title:  Some Pedantry 

message: The explicit formulae for \psi(x) via the sums over zeta zeroes, that are given in this article and in Explicit formula, differ by a -\log(1-x^2)/2 term , so (at least) one of them is wrong. I'm afraid I don't know yet, which one. Burivykh (talk) 13:28, 15 November 2009 (UTC)
replies: text: Checked. An error is here: see MathWorld. Correcting. Burivykh (talk) 15:57, 15 November 2009 (UTC)
replies: text:  Perhaps it's the term corresponding to the trivial zeroes, as they are exactly in the negative even numbers; MathWorld says "sum over non-trivial zeroes". So most probably it's OK both here and there... Burivykh (talk) 16:08, 15 November 2009 (UTC)
replies: text: Right. — Emil J. 11:46, 16 November 2009 (UTC)
replies: text:  OK, thanks! Burivykh (talk) 19:31, 17 November 2009 (UTC)
thread_title:  Explicit formula 

message: In the base 10 system practically all the prime numbers are of the category 6N+/-1. However, it is possible to combine those two categories of numbers by using a different numerical base system. And which base system is that? Why the base 2 system, of course!  In the base 2 system, no number ending in 0 could be a prime number, So the question becomes which is the biggest base 2 number (ending in 1), that cant be divided by a smaller base 2 number ending in 1? Is there a simple formula or program for determining that?WFPM (talk) 22:15, 14 August 2010 (UTC)
replies: text: I think you may have misunderstood something. Whether a number is prime or not does not depend on the base that is used to represent it. There is no "biggest base 2 number ending in 1 that cannot be divided by a smaller base 2 number ending in 1"; if there were, it would be the largest odd number that cannot be divided by a smaller odd number and therefore it would be the largest prime number, but we know that there is no largest prime. Gandalf61 (talk) 07:44, 15 August 2010 (UTC)

text: The expression is "c'est la vie"; it's French ("that's life" would be a passable translation). There is no largest integer, and likewise no largest prime. It's easy to take square roots in binary -- at least as easy as taking them in decimal, at least. CRGreathouse (t | c) 16:38, 15 August 2010 (UTC)

text: This isn't really the right place for this discussion -- maybe Wikipedia:Reference desk/Mathematics?  Aside from that, I'm not sure where your questions are headed.  Yes, sieving works just fine, regardless of which base you use.  (Also, I assume you mean "binary" when you say "binomial"?)  CRGreathouse (t | c) 21:25, 15 August 2010 (UTC)

text: Okay. But my method has the result of clearing up an increasing percentage of any of the odd numbers being a prime number up to the value of the square of the largest known prime number, which is quite a reach of values, and I thought it might be worthy of note.WFPM (talk) 22:20, 15 August 2010 (UTC)
thread_title: Base integer used for prime number investigations

message: Could someone revise this statement?
The prime number theorem is equivalent to the statement that the nth prime number pn is approximately equal to n ln(n), again with the relative error of this approximation approaching 0 as n approaches infinity.
I expect it should be n/ln(n).--Almuhammedi (talk) 13:32, 23 February 2013 (UTC)
replies: text: The statement is correct. Note that it is about the nth prime number and not about the number of primes below n. The nth prime number is clearly larger than n. For example, the 1,000,000th prime number is 15,485,863, while the number of primes below 1,000,000 is 78,498. PrimeHunter (talk) 13:56, 23 February 2013 (UTC)
thread_title:  Prime number equivalent statement 

message: Are there any theories of what ending figure that is most common among primes - 1, 3, 7 or 9 ? Or is it proven that there are equal amounts of of these ending figures, when moving towards infinity ? Boeing720 (talk) 21:35, 11 September 2013 (UTC)
replies: text: Each of them occurs in asymptotically 1/4 of all primes, but due to Chebyshev bias, 1 and 9 should be slightly less common than 3 and 7.—Emil J. 12:27, 12 September 2013 (UTC)
thread_title:  Ending figure (something different) 

message: At Approximations_for_the_nth_prime_number there is a statement of the 200 quadrillionth prime number. My question is short scale or long scale? Because of this confusion I suggest the use of scientific notation. John W. Nicholson (talk) 22:29, 20 November 2013 (UTC)
replies: text: It says "Again considering the 200 quadrillionth prime number 8512677386048191063". A long scale quadrillion is 1024 and 8512677386048191063 only has 19 digits so it's clearly short scale. Wikipedia:Manual of Style/Dates and numbers#Large numbers says billion and trillion are understood to be short scale, but doesn't mention even larger numbers. "Again" in the quote refers to the earlier mention of 200 quadrillion in Prime number theorem#Statement of the theorem where it says 200 · 1015. I think we are OK but if quadrillion isn't used the second time then it shouldn't be used the first either. It would be odd to first refer to a number by name and later by scientific notation when the same example is used. PrimeHunter (talk) 23:14, 20 November 2013 (UTC)
thread_title:  200 quadrillionth prime number? 

message: The PNT implies the estimate p_n \sim n \log n for the n-th prime.  It is proposed to replace this with p_n \sim n \log p_n: is there a reason for this more complicated version?  Is it supported by reliable sources?  Deltahedron (talk) 20:16, 31 July 2014 (UTC)
replies: text: Well, by the prime number theorem we have the more direct version n=\pi(p_n)\sim p_n/\log p_n. It is "supported by common sense", and so I have no doubt thousands of "reliable sources" must exist. Of course one will prefer the standard version p_n\sim n\log n, if one is rather interested in the behavior of p_n with respect to n (which is often the case). Sapphorain (talk) 21:36, 31 July 2014 (UTC)

text: p_n\sim n\log p_n easily leads to a better approximation: p_n\sim n (log n + log log n)
The article does mention even a better approximation along the same lines. Whyes19 (talk) 23:00, 2 August 2014 (UTC)

text: Do you have a reference for that?  I'm not disputing it, but if you want to insert it into the article it must, as always, be verified by citing a reliable source.  Deltahedron (talk) 06:40, 3 August 2014 (UTC)
thread_title:  Estimate for ''n''-th prime 

message: As a consequence of the prime number theorem, one gets an asymptotic expression for the nth prime number, denoted by pn:
:p_n \sim n \ln n.
A better approximation is
:{ \frac{p_n}{n} = \ln n + \ln \ln n - 1 + \frac{\ln \ln n - 2}{\ln n} - \frac{(\ln\ln n)^2 - 6 \ln \ln n + 11}{2(\ln n)^2} + o \left( \frac {1}{(\ln n)^2}\right).} 
Again considering the 200 · 1015 prime number 8512677386048191063, this gives an estimate of 8512681315554715386; the first 5 digits match and relative error is about 0.00005%.
Rosser's theorem states that pn is larger than n ln n. This can be improved by the following pair of bounds:
: \ln n + \ln\ln n - 1 < \frac{p_n}{n} <  \ln n + \ln \ln n \quad\text{for } n \ge 6. 
Whyes19 (talk) 00:53, 4 August 2014 (UTC)
replies: text: But it is incorrect. The article itself says that the asymptotics are derived empirically. But it is not possible to empirically derive a o(1/ln²n) term. Look: how these asymptotics are represented here, it means that the number 11 which appears in the numerator of the last fraction can neither be replaced by 11+ε nor by 11-ε for any ε > 0, since then the difference ε/ln²n would be larger than o(1/ln²n). It makes no sense. Tommy Rene Jensen (talk) 21:29, 27 November 2023 (UTC)
replies: text:  Are you claiming that Rosser's theorem is incorrect? It's obviously compatible with the asymptotics given, and the asymptotics prove that the equality is eventually true in any case. 'All' Rosser needed to show was that it holds for n >= 6 rather than some unspecified N. - CRGreathouse (t | c) 04:11, 28 November 2023 (UTC)
thread_title: Approximations for the ''n''th prime number

message: I recently noticed that the image isn't quite right. I don't know if it was because of the method or software used to create it that didn't have much precision at drawing a single pixel, but it printed some extra dots (which represent primes) and also some others that are missing. It can easily be checked by looking at the upper left corner of the image where it begins. It shows as primes: 2, 3, 4, 6, 7, 9, 10, 12, 13, etc.
By that reason I feel that it would be better if that image is omitted or changed. I also offer an image that I made myself as a replacement for the actual image. However, I couldn't upload it to Wikipedia because I'm not autoconfimed yet. The best way of uploading it that I thought of was doing it to MEGA. The link is below. I'm sorry for not having a better way to show the image. Also, if it is too wide I can rearrange it, so it fits any other width as desired. The width that I used was just because it is equal to the fifth primorial (2 to 11) so the primes line up better.
Primes_distribution_up_to_19_primorial.png
--Dv-id.061 (talk) 07:06, 19 January 2015 (UTC)
replies: text: I proceeded to update the file in Wikimedia Commons. The only change that has to be done now is to delete the - 1 after each number in the description which says, "top-right corner is 11# (2310) - 1", and "bottom-right corner is 19# (9,699,690) - 1".  — Preceding unsigned comment added by Dv-id.061 (talk • contribs) 08:19, 19 January 2015 (UTC)
replies: text:  Your version rendered completely white at the resolution in the article. I have reverted :commons:File:Primes - distribution - up to 19 primorial.png to the former version. The description says "only odd numbers are shown", so it would be impossible to display the even composites you list. The image is 1155 pixels wide because 2310/2 = 1155. PrimeHunter (talk) 03:06, 19 August 2015 (UTC)

text: So, are there any objections to deleting this image? If there are objections, could someone explain what information can be gleaned from this image? MathPerson (talk) 14:10, 2 June 2019 (UTC)
replies: text:  Final request/final notice: I really hate to delete things from an encyclopedia. However, since April 1, there have been no objections to deleting this image, and nobody has indicated that it has any value. So, I'll delete it on July 6. MathPerson (talk) 22:50, 4 July 2019 (UTC)
replies: text:  Done MathPerson (talk) 00:17, 9 July 2019 (UTC)
thread_title:  Primes Distribution Image Is Wrong 

message: Hi - this line (from the beginning)isn't clear: "It formalizes the intuitive idea that primes become less common as they become larger." (My emphasis for intuitive).  There is really nothing intuitive about the idea that there should be less primes as the numbers get larger.
Gene Klein — Preceding unsigned comment added by 209.65.177.129 (talk) 
:It can vary what people consider intuitive but I think the large majority of people who understand the concept of prime numbers would expect less primes among larger numbers when there are more potential factors below the number. It's common to speak of intuitive in such contexts. PrimeHunter (talk) 02:03, 24 February 2015 (UTC)
thread_title:  Intuition 

message: I was reading this:
:\psi(x) = \sum_{p\le x} \log p \left\lfloor \frac{\log x}{\log p} \right\rfloor \le \sum_{p\le x} \log x = \pi(x)\log x
and wondering if:
:\psi(x) = \sum_{p\le x} \log p \left\lfloor \frac{\log x}{\log p} \right\rfloor
should be:
:\psi(x) = \left\lfloor \frac{\log x}{\log p} \right\rfloor \sum_{p\le x} \log p 
or:
:\psi(x) = \sum_{p\le x} \left(\log p \left\lfloor \frac{\log x}{\log p} \right\rfloor\right)?
:: It should be neither, but just as it is. The first expression makes no sense, and the parentheses in the second one are redundant by convention (see order of operations). Sapphorain (talk) 07:44, 25 October 2016 (UTC)
thread_title:  Add ()? 

message: The image description below the approximations’ absolute error plot states that On the other hand,  switches sign infinitely many times, but the plot clearly shows values of that function stay positive. On the other hand the function fluctuates with x – it generally increases, but not monotonically. So shouldn’t the description state that the first derivative of  switches sign infinitely many times? Silmethule (talk) 09:48, 25 September 2018 (UTC)
replies: text: Or does it change signs near the beginning of the coordinate system, for low xs? If so, could it be stated more clearly? Silmethule (talk) 09:54, 25 September 2018 (UTC)
replies: text:  The first sign change is known to be somewhere before 10^1000 (see ), at a place where no representation of the function Lix-pi(x) is available (or calculable). Sapphorain (talk) 10:50, 25 September 2018 (UTC)
thread_title:  Sign switching of Li(''x'')-''π''(''x'')? 

message: Looking at https://dlmf.nist.gov/27.12, specifically 27.12.6,  the sign of the denominator term shows -1/5, whereas the article shows (1/5) (see just after "...for some positive constant a, where O(...) is the big O notation. This has been improved to...".  I have no clue which is correct.Billymac00 (talk) 02:52, 6 February 2021 (UTC)
thread_title:  Discrepancy 

message: Toward the end of the section Proof sketch this passage appears:
"The next step in the proof involves a study of the zeros of the zeta function. The trivial zeros −2, −4, −6, −8, ... can be handled separately:
:\sum_{n=1}^\infty \frac{1}{2n\,x^{2n}} = -\frac{1}{2}\log\left(1-\frac{1}{x^2}\right),
which vanishes for a large ."
But neither the left-hand expression nor the right-hand expression "vanishes" for any value of x.
I hope someone familiar with this subject can fix this. 2601:200:C000:1A0:60C7:98D0:A3AE:B606 (talk) 01:34, 6 December 2021 (UTC)
replies: text: "vanish" does not mean here "is equal to zero", but "tends to zero". I would however suppress the indefinite article "a" before "large x". --Sapphorain (talk) 07:52, 6 December 2021 (UTC)
thread_title:  Is this right? 

message: Hi,
May I know why this proof was censored? 75.25.161.74 (talk) 04:07, 29 June 2023 (UTC)
replies: text: I suspect that because it was unreferenced (unsourced) and there was errors in a couple of math formula; some editors prefer to reverts edits instead of fixing them, even when they look mostly good. And the lack of explanation for the removal doesn't help. ... Dhrm77 (talk) 11:06, 29 June 2023 (UTC)
thread_title:  Proof via phi(n) removal 

message: okay i UNDERSTAND that prime number theorem has a lot of historical background to it, bit that's all this page is?
it's almost impenetrable to a general user about what the prime number theorem is even about because off all the COSNTANT references to how this subject came about historically.
this page needs a serious rewrite, this is absurd 2600:6C47:A03F:C443:60AF:8C36:BD3:F514 (talk) 18:06, 2 September 2023 (UTC)
thread_title:  page is better titled history of prime number counting theorem 

message: Could it improve the article to have some text about new work in the subject of how many primes there are in an arithmetic progression? Maynard discusses his extention of the Bombieri-Vinogradov Theorem in (Primes in arithmetic progressions to large moduli I: Fixed residue classes (arxiv.org)); Dirichlet's theorem shows that the primes are roughly equidistributed for a coprime to q, and the Generalized Riemann Hypothesis (GRH) would imply this equidistribution occurs whenever q is smaller than the square-root of the size of the primes. Also, it is helpful that the Siegel–Walfisz theorem is mentioned, but Bombieri–Vinogradov theorem (1965), which has an article on Wikipedia, is not mentioned. It probably should be mentioned here. Maybe the Maynard work is too advanced, but there seems to be a gap here. Rozenwithaz (talk) 19:14, 6 November 2023 (UTC)
thread_title:  Recent work on primes in arithmetic progressions; fixed residue classes