{"id":159,"date":"2013-03-18T07:22:25","date_gmt":"2013-03-18T11:22:25","guid":{"rendered":"http:\/\/www.curtisbright.com\/bln\/?p=159"},"modified":"2013-03-18T07:22:25","modified_gmt":"2013-03-18T11:22:25","slug":"a-weak-form-of-the-prime-number-theorem","status":"publish","type":"post","link":"http:\/\/localhost\/blog\/index.php\/2013\/03\/18\/a-weak-form-of-the-prime-number-theorem\/","title":{"rendered":"A weak form of the prime number theorem"},"content":{"rendered":"<p>The function $\\pi(n)$ counts the number of primes $p$ in the range $1\\leq p\\leq n$. One of the most spectacular\u00a0theorems in mathematics is the so-called\u00a0<em>prime number theorem<\/em>, which states that<\/p>\n<p>\\[ \\lim_{n\\to\\infty}\\Bigl(\\pi(n)\\Bigm\/\\frac{n}{\\ln n}\\Bigr) = 1 . \\]<\/p>\n<p>This is a strong condition on the asymptotic behaviour of $\\pi(n)$ as $n$ increases without bound&#8212;unlike some asymptotic results, even the base of the logarithm is significant here.<\/p>\n<p>Last year I worked through a proof of the prime number theorem. Two of the main results used were\u00a0<a href=\"http:\/\/en.wikipedia.org\/wiki\/Riemann_zeta_function#Euler_product_formula\">Euler&#8217;s product<\/a> and <a href=\"http:\/\/en.wikipedia.org\/wiki\/Residue_theorem\">Cauchy&#8217;s residue theorem<\/a>&#8212;it was breathtaking. It still hasn&#8217;t completely &#8220;coalesced&#8221; in my head, but I periodically revisit it. Today I want to prove a weaker form of the prime number theorem, namely that<\/p>\n<p>\\[ \\pi(n) = \\Theta\\Bigl(\\frac{n}{\\ln n}\\Bigr) . \\]<\/p>\n<p>This uses <a href=\"http:\/\/en.wikipedia.org\/wiki\/Big_O_notation#Family_of_Bachmann.E2.80.93Landau_notations\">asymptotic notation<\/a>, and says that the growth rate of $\\pi(n)$ is eventually within a constant factor of $n\/\\ln n$.<a href=\"http:\/\/en.wikipedia.org\/wiki\/Asymptotic_notation#Family_of_Bachmann.E2.80.93Landau_notations\"><br \/>\n<\/a><\/p>\n<p>The proof is by <a href=\"http:\/\/en.wikipedia.org\/wiki\/Pafnuty_Chebyshev\">Chebyshev<\/a> and proceeds by finding the following bounds on the <a href=\"http:\/\/en.wikipedia.org\/wiki\/Central_binomial_coefficient\">central binomial coefficient<\/a> $\\binom{2n}{n}$:<\/p>\n<p>\\begin{align}<br \/>\n2^n \\leq \\binom{2n}{n} &amp;\\leq 4^n \\tag{1} \\\\<br \/>\nn^{\\pi(2n)-\\pi(n)} \\leq \\binom{2n}{n} &amp;\\leq (2n)^{\\pi(2n)} \\tag{2}<br \/>\n\\end{align}<\/p>\n<h1>Upper bound of (1)<\/h1>\n<p>Using the binomial theorem to expand $(1+1)^{2n}$ gives<\/p>\n<p>\\[ 4^n = 2^{2n} = (1+1)^{2n} = \\sum_{i=0}^{2n}\\binom{2n}{i} \\geq \\binom{2n}{n} \\]<\/p>\n<p>since all the terms in the sum are positive.<\/p>\n<h1>Lower bound of (1)<\/h1>\n<p>However, note that the central term ($i=n$) in the sum is the largest (to go from term $i$ to term $i+1$ you multiply by $\\frac{2n-i}{i+1}$, which is greater than $1$ until $i\\geq n$), so we have:<\/p>\n<p>\\[ 4^n\u00a0= 2^{2n} = (1+1)^{2n} = \\sum_{i=0}^{2n}\\binom{2n}{i} \\leq (2n+1)\\binom{2n}{n}\u00a0\\]<\/p>\n<p>The required inequality follows after dividing by $2^n$ and using the fact that\u00a0$2n+1\\leq2^n$ (which holds for $n\\geq3$, however the required inequality may explicitly be checked to hold for $n&lt;3$).<\/p>\n<h1>Lower bound of (2)<\/h1>\n<p>Examining the prime factorization of\u00a0$\\binom{2n}{n}=(2n)!\/(n!)^2$, we see that it contains all the primes $p$ in the range $n&lt;p\\leq 2n$, since they appear in the numerator but not in the denominator. There are\u00a0$\\pi(2n)-\\pi(n)$ primes in this range, and they are all larger than $n$, so it follows that:<\/p>\n<p>\\[ \\binom{2n}{n} \\geq \\prod_{n&lt;p\\leq 2n} p \\geq n^{\\pi(2n)-\\pi(n)}\u00a0\\]<\/p>\n<h1>Upper bound of (2)<\/h1>\n<p><a name=\"upper-bound-2\"><\/a>Note that there are $\\lfloor n\/p\\rfloor$ multiples of $p$ in the range $1\\leq p\\leq n$. We can use this fact to determine the exponent on $p$ in the prime factorization of $n!$. There will be $\\lfloor n\/p\\rfloor$ factors of $p$ in $n!$, but we also need to count the additional $\\lfloor n\/p^2\\rfloor$ factors of $p$ which are contributed by multiples of $p^2$, and in general an additional\u00a0$\\lfloor n\/p^k\\rfloor$ factors of $p$ contributed by multiples of $p^k$. The exponent of $p$ in the prime factorization of $n!$ is thus<\/p>\n<p>\\[ \\sum_{k=1}^\\infty \\biggl\\lfloor\\frac{n}{p^k}\\biggr\\rfloor , \\]<\/p>\n<p>where the sum is zero for $k&gt;\\log_p n$. It follows that the exponent of $p$ in the prime factorization of $(2n)!\/(n!)^2$ is<\/p>\n<p>\\[ \\sum_{k=1}^{\\lfloor\\log_p(2n)\\rfloor} \\biggl(\\biggl\\lfloor\\frac{2n}{p^k}\\biggr\\rfloor &#8211; 2\\biggl\\lfloor\\frac{n}{p^k}\\biggr\\rfloor\\biggr) . \\]<\/p>\n<p>An interesting fact about the function $\\lfloor 2x\\rfloor-2\\lfloor x\\rfloor$ is that it is either $0$ or $1$ (plot it and you&#8217;ll see why), so this sum is actually at most $\\lfloor\\log_p(2n)\\rfloor$. Since $\\binom{2n}{n}$ only contains primes $p$ in the range $1\\leq p\\leq 2n$, it follows that:<\/p>\n<p>\\[ \\binom{2n}{n} \\leq \\prod_{1\\leq p\\leq 2n}p^{\\log_p(2n)} = \\prod_{1\\leq p\\leq 2n} 2n = (2n)^{\\pi(2n)} \\]<\/p>\n<h1>Using the bounds<\/h1>\n<p>Putting both (1) and (2) together and taking logarithms yields the following bounds:<\/p>\n<p>\\begin{gather}<br \/>\nn\\ln 2 \\leq \\pi(2n)\\ln(2n) \\tag{3} \\\\<br \/>\n(\\pi(2n)-\\pi(n))\\ln n \\leq n\\ln 4 \\tag{4}<br \/>\n\\end{gather}<\/p>\n<h1>The lower bound on $\\pi(n)$<\/h1>\n<p>From (3) we have that<\/p>\n<p>\\[ \\pi(2n) \\geq \\frac{\\ln2}{2}\\frac{2n}{\\ln(2n)} , \\]<\/p>\n<p>which is shows the required lower bound for <em>even<\/em> numbers. But it can be slightly modified to work for odd numbers as well (note that\u00a0$\\ln(2n)\\leq\\ln(2n+1)$):<\/p>\n<p>\\[ \\pi(2n+1) \\geq \\pi(2n) \\geq \\frac{2n+1}{2n+1}\\frac{\\ln2}{2}\\frac{2n}{\\ln(2n)} \\geq \\frac{2n}{2n+1}\\frac{\\ln2}{2}\\frac{2n+1}{\\ln(2n+1)}\u00a0\\]<\/p>\n<p>Since $2n\/(2n+1)$ is lower bounded by a constant (e.g., $2\/3$) for all positive $n$, this shows that $\\pi(n)=\\Omega(n\/\\ln n)$.<\/p>\n<h1>The upper bound on $\\pi(n)$<\/h1>\n<p>First we will show the required upper bound for <em>powers of two<\/em>. That way we will be able to apply (4) not only on $n$ but also recursively\u00a0on half of $n$ until $n=1$ is reached. However, to get a nice telescoping sum we modify (4) by subtracting $\\pi(n)\\ln(n\/2)$ from both sides. After rearranging and simplifying with $\\ln n-\\ln(n\/2)=\\ln2$, we find<\/p>\n<p>\\[ \\pi(2n)\\ln n &#8211; \\pi(n)\\ln(n\/2) \\leq n\\ln4 + \\pi(n)\\ln 2 \\leq (3\\ln 2)n \\tag{5} \\]<\/p>\n<p>since $\\pi(n)\\leq n$ and $\\ln4+\\ln2=3\\ln2$.<\/p>\n<p>We now sum together (5) used on $n{,}~n\/2{,}~\\dotsc{,}~1$ to get<\/p>\n<p>\\[ \\sum_{i=0}^{\\log_2 n}\\biggl(\\pi\\Bigl(\\frac{n}{2^{i-1}}\\Bigr)\\ln\\Bigl(\\frac{n}{2^i}\\Bigr)-\\pi\\Bigl(\\frac{n}{2^i}\\Bigr)\\ln\\Bigl(\\frac{n}{2^{i+1}}\\Bigr)\\biggr) \\leq (3\\ln 2)\\sum_{i=0}^{\\log_2 n}\\frac{n}{2^i} . \\]<\/p>\n<p>However, by telescoping the left sum is equal to $\\pi(2n)\\ln n$ and by the formula for the summation of a geometric series the right sum is at most $(3\\ln2)2n$. In other words, when $n$ is a power of two we have<\/p>\n<p>\\[ \\pi(2n) \\leq (6\\ln2)\\frac{n}{\\ln n} , \\]<\/p>\n<p>and the required bound follows using\u00a0$\\frac{n}{\\ln n}&lt;\\frac{2n}{\\ln(2n)}$, a consequence of the fact that\u00a0$\\frac{n}{\\ln n}$ is an increasing function (for $n\\geq3$, although the required bound still holds for $n&lt;3$).<\/p>\n<p>As before, a slight modification shows the bound holds for all numbers, not just powers of two. Let $m$ be an arbitrary integer in the range $n\\leq m&lt;2n$ where $n$ is a power of two. Then<\/p>\n<p>\\[ \\pi(m) \\leq \\pi(2n) \\leq (6\\ln 2)\\frac{n}{\\ln n} \\leq (6\\ln 2)\\frac{m}{\\ln m} \\]<\/p>\n<p>which shows that $\\pi(n)=O(n\/\\ln n)$.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The function $\\pi(n)$ counts the number of primes $p$ in the range $1\\leq p\\leq n$. One of the most spectacular\u00a0theorems in mathematics is the so-called\u00a0prime number theorem, which states that \\[ \\lim_{n\\to\\infty}\\Bigl(\\pi(n)\\Bigm\/\\frac{n}{\\ln n}\\Bigr) = 1 . \\] This is a &hellip; <a href=\"http:\/\/localhost\/blog\/index.php\/2013\/03\/18\/a-weak-form-of-the-prime-number-theorem\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[],"_links":{"self":[{"href":"http:\/\/localhost\/blog\/index.php\/wp-json\/wp\/v2\/posts\/159"}],"collection":[{"href":"http:\/\/localhost\/blog\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/localhost\/blog\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/localhost\/blog\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/localhost\/blog\/index.php\/wp-json\/wp\/v2\/comments?post=159"}],"version-history":[{"count":0,"href":"http:\/\/localhost\/blog\/index.php\/wp-json\/wp\/v2\/posts\/159\/revisions"}],"wp:attachment":[{"href":"http:\/\/localhost\/blog\/index.php\/wp-json\/wp\/v2\/media?parent=159"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/localhost\/blog\/index.php\/wp-json\/wp\/v2\/categories?post=159"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/localhost\/blog\/index.php\/wp-json\/wp\/v2\/tags?post=159"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}