MAT 338 Day 37

1146 days ago by pub

First, X enlightens us on the Prime Number Theorem!

Then, some discussion of hand-in homework (probably last one so the rest is on take-home?):

  1. Do Exercise 8.2 for \tau only.
  2. Do Exercise 8.8.
  3. Do Exercise 8.23.
  4. Let \tau_o(n) and \sigma_o(n) be the same as \tau and \sigma but where only odd divisors of n are considered; let \tau_e and \sigma_e be similar for even divisors of n.  Evaluate these functions for n=1 to 12, and decide whether each of them is multiplicative or not (either proving it, or showing not by counterexample).
  5. Find the smallest number you can for which \sigma(n)>5n.
  6. Discover and prove when \tau(n) is even and odd.
  7. Show that if n is odd then \tau(n) and \sigma(n) have the same parity.
  8. Show that a multiple of an abundant number is abundant.
  9. Characterize numbers which are amicable with themselves.
  10. Find a 3-perfect number.
  11. Show that \sigma(n) is O(n^2) (compare to the sum of all integers).
  12. Use the formula for the sum of the first n perfect squares (from Transitions/Discrete or Calculus; it was probably in both for you) and the previous exercise to show that the average value of \sigma(n) is Big Oh of n^2.  (This can be loosey-goosey.)
  13. Find a formula for the average value of the u and N functions on page 145 in the book (up through n).
  14. Find absolute bounds for \phi(n) (formulas in terms of n).
  15. Use data, graphs, whatever to conjecture what type of growth the average value of \phi has up to n - is it logarithmic, linear, quadratic, exponential, something else?  Bonus if you find a coefficient for the growth!  
With regard to the last quesiton, see the graph below.  (Note that Sage should now be working again everywhere, including my computer and our local server - we just had to reconfigure something, hooray!)
end=100 M=[euler_phi(n) for n in [1..end]] line([(i,(sum(M[1:i+1])/i).n()) for i in [1..end]])+plot(3/pi^2*x,0,end,color='black',linestyle="--") 
       

As X has pointed out, the Holy Grail of 19th century number theory was conjectured by Gauss and Legendre just before 1800. Let \log(n) be the natural logarithm function.  Then we have:

Prime Number Theorem: If \pi(x) is the number of primes p\leq x, then

\lim_{x\to\infty}\frac{\pi(x)\log(x)}{x}=1\, .

As you might recall from last time and X's talk, this is equivalent to saying that

\lim_{x\to\infty}\frac{\pi(x)}{\int_2^{x} \frac{dt}{\ln(t)}}=1
as well.  Here is a similar graph to the one from last time, along with another one showing the relative differences - both out to x=1000.

def primecomp1(x): return (prime_pi(x)-ln(x)/x)/x def primecomp2(x): return (prime_pi(x)-Li(x))/x @interact def _(end=1000): plot1=plot(prime_pi,0,end,color='black')+plot(x/ln(x),0,end,color='red')+plot(Li,2,end,color='blue') plot2=plot(primecomp1,1,end,color='black')+plot(primecomp2,1,end,color='red') show(plot1);show(plot2) 
       

Click to the left again to hide and once more to show the dynamic interactive window

Remember that this was proved about 100 years later by Hadamard and de la Vallee-Poussin. What methods might one use to prove such a bizarre statement?  The rest of today we will try to get a sense of this - the beginnings of true analytic number theory.

First off, if X didn't mention it, first look back in your handout, the bottom of page 6 to the middle of page 7.  This gives us a good sense of just how crazy such questions are to pretend we have the capacity to answer them.

Next, let's look at a couple of contributions of the great Russian mathematician Chebyshev (Чебышёв), who made fundamental contributions to this type of number theory as well as to statistics!  

@interact def _(n=16000000000): print next_prime(n) print next_prime(n)<2*n 
       

Click to the left again to hide and once more to show the dynamic interactive window

The above cell "verifies" Bertrand's Postulate/Chebyshev's Theorem, which Y mentioned in her talk on Erdos, than between n and 2n there is always a prime. Another great theorem of his is the following, which is somewhat weaker than the PNT but more accessible:

Theorem: It is true both that \pi(x) is O(\frac{x}{\ln(x)}) and that \frac{x}{\ln(x)} is O(\pi(x)).

It would take far too long to verify this properly, but we can at least show the gist of a small piece of this:

Proposition: The prime counting function \pi(x)<2\frac{x}{\ln(x)}.

Proof Sketch:

(We'll skip this if it's looking like time is running low for today, and do it next time instead.)

It's not hard to verify this for x<100:

plot(prime_pi,1,100)+plot(2*x/ln(x),1,100,color='black') 
       

Okay, what next?  The idea is to proceed by induction, in an unusual way - namely, assume it is true for n, and prove it is true for 2n!  This needs a little massaging for odd numbers, but is a legitimate induction method.  So we assume that \pi(n)<2\frac{n}{\ln(n)}.  Now what?  

Our next step is very interesting.  We want to look at the product of all the primes between n and 2n, which we can write as

P=\prod_{n<p<2n} p\, .
 One the one hand, since each of these primes p is greater than n (p>n), and there are \pi(2n)-\pi(n) of them (think about this!), we can say
n^{\pi(2n)-\pi(n)}<P\, .
 On the other hand, since each of these primes is greater than n but they are all in the list of numbers from n to 2n, we can legitimately say that each of them (and their product) divides \frac{(2n)\cdot (2n-1)\cdot (2n-2)\cdots (n+1)}{n\cdot (n-1)\cdot (n-2)\cdots 1}, that is to say
P\mid \frac{(2n)\cdot (2n-1)\cdot (2n-2)\cdots (n+1)}{n\cdot (n-1)\cdot (n-2)\cdots 1}=\frac{(2n)!}{n!n!}\, ,
which means that in particular
P\leq \frac{(2n)!}{n!n!}\, .
 But this last is the number of ways to choose n things from a collection of 2n things, which is certainly less than the number of ways to pick any old collection out of 2n things, which is 2^{2n} (because you either pick it or you don't).  That leads to the estimate
n^{\pi(2n)-\pi(n)}<P\leq \frac{(2n)!}{n!n!}<2^{2n}\, ;
take \ln of both ends to get
(\pi(2n)-\pi(n))\ln(n)<2n\ln(2)
and then divide out and isolate to get
\pi(2n)<\frac{2n\ln(2)}{\ln(n)}+\pi(n)<\frac{2n\ln(2)}{\ln(n)}+2\frac{n}{\ln(n)}=(\ln(2)+1)\frac{2n}{\ln(n)}\, .
 Now we just need some little trick based on n>100 (since we already verified for lower n) and a little calculus to get that \frac{\ln(2)+1}{\ln(n)}<\frac{2}{\ln(2)+\ln(n)}=\frac{2}{\ln(2n)}, which yields that
\pi(2n)<(\ln(2)+1)\frac{2n}{\ln(n)}<2\frac{2n}{\ln(2n)}\, ,
which is exactly what the proposition would predict.

It turns out that more advanced statements are not so easy to prove without a lot of work - and our main goal is to get back to general functions stuff the last two weeks of the course.  Still, I want to end today with a substantial piece of a real proof in this direction; it is dense, but just like the last few proofs, requires nothing beyond calculus and a willingness to allow a lot of algebraic and integral manipulation for the purposes of estimation.

Functions: First, we'll review the main function. Think of the prime counting function \pi as a so-called `step' function, where every time you hit a new prime you add 1.

@interact def _(n=100): show(plot(prime_pi,1,n)) 
       

Click to the left again to hide and once more to show the dynamic interactive window

Instead of adding 1 each time, let's add \log(p) each time we hit a prime p. Of course, this will get bigger as p gets bigger.

def theta(x): return sum(math.log(p) for p in prime_range(1,floor(x)+1)) @interact def _(n=100): show(plot(theta,1,100)) 
       

Click to the left again to hide and once more to show the dynamic interactive window

We call this Chebyshev's theta function, and we write

\Theta(x)=\sum_{p\leq x}\log(p)\, .
It turns out the PNT implies the following limit (in fact, they're equivalent):
\lim_{x\to\infty}\frac{\Theta(x)}{x}=1\, .
Here is a plot of both limits, along with the constant function 1.

def pnt(n): return prime_pi(n)*log(n)/n def thox(n): return theta(n)/n @interact def _(end=100000): show(plot(1,(1,end),color='black')+plot(pnt,(1,end),color='red')+plot(thox,(1,end))) 
       

Click to the left again to hide and once more to show the dynamic interactive window

An Integral Formula: In order to prove this, we will first need a formula telling us about \Theta(x). It turns out that integrals will help! Let m=[x], the greatest integer less than x. Let a(n) be the function such that a(p)=1 if p is prime and a(n)=0 otherwise; another way to say this is a(n)=\pi(n)-\pi(n-1). Then it should be clear that

\pi(x)=\sum_{n=1}^{m}a(n)\text{ and }\Theta(x)=\sum_{n=1}^{m}a(n)\log(n)\, .

By rearranging the sum in different ways (and using \log(1)=0), we see that

\Theta(x)=\sum_{1\leq n\leq x}a(n)\log(n)=\sum_{n=1}^{m}a(n)\log(n)=
\sum_{n=2}^{m}[\pi(n)-\pi(n-1)]\log(n)=\sum_{n=2}^{m}\pi(n)\log(n)-\sum_{n=1}^{m-1}\pi(n)\log(n+1)
which can be combined with just two left over terms, the second of which is 0:
\sum_{n=2}^{m-1}\pi(n)[\log(n)-\log(n+1)]+\pi(m)\log(m)-\pi(1)\log(1)\, .
Now, \log(n+1)-\log(n)=\int_{n}^{n+1}\frac{dt}{t}; using this and a few other sleights of hand of integrals, rearrangement, and that \pi(x)=\pi(m) is constant on [m,x], we get
-\sum_{n=2}^{m-1}\Big[\pi(n)\int_{n}^{n+1}\frac{dt}{t}\Big]+\pi(m)\log(m)
=-\sum_{n=2}^{m-1}\Big[\pi(n)\int_{n}^{n+1}\frac{dt}{t}\Big]+\pi(m)\log(m)-\pi(x)\log(x)+\pi(x)\log(x)
=-\int_{2}^{m}\frac{\pi(t)dt}{t}+\pi(x)\log(x)-\int_{m}^{x}\frac{\pi(t)dt}{t} =\pi(x)\log(x)-\int_{2}^{x}\frac{\pi(t)dt}{t}\, .

The Final Step: Now we have a formula for \Theta which will allow us to prove something. To recap, we have:

\frac{\Theta(x)}{x}=\frac{\pi(x)\log(x)}{x}-\frac{\int_{2}^{x}\frac{\pi(t)}{t}dt}{x}\, ,
so, given that the Prime Number Theorem says that \lim_{x\to\infty} of the fraction with \pi(x) in it is 1, proving that \lim_{x\to\infty} of \frac{\Theta(x)}{x} is also 1 is equivalent to proving
\lim_{x\to\infty}\frac{1}{x}\int_{2}^{x}\frac{\pi(t)}{t}dt=0\, .
But since the PNT essentially says that in the limit \frac{\pi(t)}{t}\sim \frac{1}{\log(t)}, we can write that
\frac{1}{x}\int_{2}^{x}\frac{\pi(t)}{t}dt\sim \frac{1}{x}\int_{2}^{x}\frac{dt}{\log(t)}\, .
Now look at the following graph. An upper sum for the integral of 1/\log(t) between 2 and 9 is the area of the two rectangles shown, one with area \frac{1}{\log(2)}(\sqrt{9}-2) and the other with area \frac{1}{\log(\sqrt{9})}(9-\sqrt{9}), where of course \sqrt{9}=3.

@interact def _(top=(16,[n^2 for n in [2..10]])): f(x)=1/ln(x) P=plot(f,1,top+1) P+=line([(2,0),(2,f(2)),(math.sqrt(top),f(2)),(math.sqrt(top),0)],rgbcolor='black') P+=line([(math.sqrt(top),f(math.sqrt(top))),(top,f(math.sqrt(top))),(top,0)],rgbcolor='black') P.show(ymax=2) 
       

Click to the left again to hide and once more to show the dynamic interactive window

Then in general replace 9 with x (one can do that by redoing the above graph with x=16 or x=25 or whatever); we use logarithmic identities to see that

\frac{1}{x}\Big(\frac{\sqrt{x}-2}{\log(2)}+\frac{x-\sqrt{x}}{\log(\sqrt{x})}\Big)= \frac{1}{\log(2)x^{1/2}}+\frac{2}{\log(x)}-\frac{2}{x^{1/2}\log(x)}-\frac{2}{\log(2)x},
which clearly goes to zero as x\to\infty. But that means that
\lim_{x\to\infty}\frac{\pi(x)\log(x)}{x}=1\text{ implies }\lim_{x\to\infty}\frac{\Theta(x)}{x}=1,\text{ our goal!}

This is naturally a tour de force, and only a small part of what one can do with all this.