0% found this document useful (0 votes)
47 views10 pages

Asympprimes

1) Primes can only be prime or not prime, with no approximation. The prime number theorem states that the number of primes less than or equal to n, π(n), is approximately n/ln(n). 2) Several results are proved, showing π(n) is between cn/ln(n) and Cn/ln(n) for some constants c and C, with c=ln(2) and C=2ln(2). 3) Combining these results yields π(n)=Θ(n/ln(n)), and if π(n)~c/ln(n), then c must equal 1.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
47 views10 pages

Asympprimes

1) Primes can only be prime or not prime, with no approximation. The prime number theorem states that the number of primes less than or equal to n, π(n), is approximately n/ln(n). 2) Several results are proved, showing π(n) is between cn/ln(n) and Cn/ln(n) for some constants c and C, with c=ln(2) and C=2ln(2). 3) Combining these results yields π(n)=Θ(n/ln(n)), and if π(n)~c/ln(n), then c must equal 1.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 10

1 Primes

Primes would seem to be the ultimate in precision. A number 317 is either


prime or it isn’t (this one is!), there is no approximation to its primality.
Nonetheless, Asymptopia is the proper place to examine primes in the ag-
gregate.

Definition 1 For n ≥ 2, π(n) denotes the number of primes p with 2 ≤


p ≤ n.

Our goal in this chapter is to show one of the great theorems of mathe-
matics.

Theorem 1.1 (The Prime Number Theorem)


n
π(n) ∼ (1)
ln n
This result was first conjectured in the early nineteenth century. (While
the conjecture is sometimes attributed to Gauss the history is murky.) It
was a central problem for that century, finally being proven independently
by Hadamard and Vallée-Poussin in 1898. There proofs involved complex
variables and a long search continued for an elementary proof. This was
finally obtained in 1949 by Selberg and Erdős. Still, a full proof of Theorem
1 is beyond the limits of this work. We shall come close to it with the
following results:

Theorem 1.2 There exists a positive constant c1 such that


n
(c1 + o(1)) ≤ π(n) (2)
ln n
That is, π(n) = Ω(n/ ln n). Further, our argument gives c1 = ln 2.

Theorem 1.3 There exists a positive constant c2 such that


n
π(n) ≤ (c2 + o(1)) (3)
ln n
That is, π(n) = O(n/ ln n). Further, our argument gives c2 = 2 ln 2.

Together, Theorem 1.2, 1.3 yield:


n
π(n) = Θ( ) (4)
ln n
With more effort we shall show
Theorem 1.4 If there exists a positive constant c such that
n
π(n) ∼ c (5)
ln n
then c = 1.

1.1 Fun with Primes


A Break! No asymptotics in this section!
How many factors of the prime 7 are there in 100!? The numbers
7, 14, . . . , 98 all have a factor of 7 so that gives 98
7 = 14 factors. And,
49 and 98 have a second factor of 7 which gives an additional 98
49 = 2 factors.
In total there are 16 = 14 + 2 factors of 7.

Definition 2 For n ≥ 1 and p prime, vp (n) denotes the number of factors


p in n. Equivalently, vp (n) is that nonnegative integer a such that pa divides
n but pa+1 does not divide n.

Theorem 1.5 For any n ≥ 1 and p prime



X n
vp (n!) = ⌊ ⌋ (6)
i=1
pi

Equivalently
s
X n
vp (n!) = ⌊ ⌋ with s = ⌊logp n⌋ (7)
i=1
pi

When i > ⌊logp n⌋, p < ni so the addend in (6), explaining the equiva-
lence. The argument with p = 7, n = 100 easily generalizes. For any i ≤ s
there are ⌊np−i ⌋ numbers 1 ≤ j ≤ n that have (at least) i factors of p. We
count each such i and j once, as then an i with precisely u factors of p will
be counted precisely u times.
We apply Theorem 1.5 to study binomial coefficients. Let n = a + b and
set C = na = a!b!
n!

. Applying (7)
s
X n a b
vp (C) = vp (n!) − vp (a!) − vp (b!) = ⌊ ⌋−⌊ ⌋ − ⌊ i⌋ (8)
i=1
pi p i p

with s = ⌊logp n⌋ as in (7).


n
Theorem 1.6 With n = a + b, p prime, and C = a ,

0 ≤ vp (C) ≤ ⌊logp n⌋ (9)


Proof: Set α = ap−i , β = bp−i . Then the addend in (8) is

⌊α + β⌋ − ⌊α⌋ − ⌊β⌋ (10)

This term is zero if the fractional parts of α, β sum to less than one and one
if they sum to one or more. The sum (8) consists of s = ⌊logp n⌋ terms, each
one or zero, and so lies between 0 and s.
Remark: With n = a + b there are two arguments why a!b! divides
n!. One: the proof of Theorem 8 gives that, for all primes p, vp (n!) ≥
vp (a!) +vp (b!) = vp (a!b!) and thus a!b! divides n!. Two: The quotient
n! n
a!b! = a counts the a-subsets of an n-sets and hence must be a nonnegative
integer. Which proof one prefers is an esthetic question 1 but it is frequently
useful to know more than one proof of a theorem.
There is an amusing way of calculating vp (C) with C = na and a+b = n.


Write a, b is base p. Add them (in base p) so that you will get n in base p.

Theorem 1.7 vp (C) is the number of carries when you add a, b getting n,
all in base p.

For example, let a = 33, b = 25 so n = 58 (written in decimal), and set


p = 7. In base 7, a = 45, b = 34. When we add them 2

45
+ 34
----
112

There we two carries and vp ( 45



34 ) = 2.
We indicate the argument. For each 1 ≤ i we get a carry from the i−1-st
place (counting from the right, starting at 0) to the i-th place if and only if
the fractional parts of ap−i and bp−i add to at least one and that occurs if
and only if term (10) is one.

1.2 PMT - Lpper Bound


Let n be even (n odd will be similar). The upper and lower bounds come
from examining the prime factorization of binomial coefficients. Set r = π(n)
1
This author prefers the “counts” argument.
2
To paraphrase the wonderful songwriter Tom Lehrer, base seven is just like base ten
– if you are missing three fingers!
and let p1 , . . . , pr denote the primes up to n and write
!
n
= pα1 1 pα2 2 · · · pαr r (11)
n/2

(There might not be a factor of pi . In that case we simply write αi = 0.)


We rewrite the upper bound of Theorem 1.6 as:

pαi i ≤ n (12)
Thus !
n
≤ nr (13)
n/2
n 
Stirling’s Formula gives an asymptotic formula for n/2 but here we use only
n 
the weaker n/2 = 2n(1+o(1)) . Taking ln of both sides of (13) and dividing
gives
n 
ln n n/2
π(n) = r ≥ =
(ln 2)(1 + o(1)) (14)
ln n ln n
What if n is odd? In Asymptopia we simply apply (14) to the even n − 1.
Thus
n−1 
ln (n−1)/2
π(n) ≥ π(n − 1) ≥ (15)
ln(n − 1)
n
which is again ln n (ln 2)(1 + o(1)).

1.3 PMT-Upper Bound


Again assume n is even. There are π(n) − π(n/2) primes p with n2 < p < n.
n 
Each of them appears in n/2 to the first power. (They appear once in the
numerator as a factor of p and never in the denominator.) Thus, with the
product over these primes,
!
Y n
p≤ (16)
n/2
n 
We again do not need a more precise estimate and here simply bound n/2 ≤
2n . Each factor p is a factor of at least n2 . Thus
n n
( )π(n)−π( 2 ) ≤ 2n (17)
2
Taking ln of both sides gives
n n
π(n) − π( ) ≤ (ln 2) (18)
2 ln(n/2)

For n = 2k + 1 odd we apply the same argument to nk getting an upper




bound on π(n) − π(k + 1). We combine the even and odd cases by writing
n n
π(n) − π(⌈ ⌉) ≤ (ln 2) (19)
2 ln(n/2)

Turning (19) into an upper bound on π(n) is a typical problem in Asymp-


topia. Set x0 = n and xi+1 = ⌈ x2i ⌉. This sequence decreases until finally
reaching xs = 1. Applying (19) to n = x0 , . . . , xs−1 and adding we get
s−1
X xi
π(n) ≤ (ln 2) (20)
i=0
ln(xi /2)

In the exact world this would be a daunting sum. In Asymptopia we will


split the sum into the main terms and the small terms. Where to make the
split is part of the art of Asymptopia which we discuss further below. For
now, let u be the first index with xu ≤ n ln−2 n. Applying (19) only down
to xu−1 and adding we get
u−1
X xi
π(n) − π(xu ) ≤ (ln 2) (21)
i=0
ln(xi /2)

Now we use the trivial bound π(xu ) ≤ xu ≤ n ln−2 n. While this is a “bad”
bound for π(xu ) it is a negligible value for us and
u−1
n X xi
π(n) ≤ o( )+ (ln 2) (22)
ln n i=0
ln(xi /2)

As xi is decreasing so is the denominator ln(xi /2) which pushes the sum


(22) up. However, all terms in the sum have xi /2 > n ln−2 n/2. The ln
function is going down, but not too far down. Each denominator

ln(xi /2) ≥ ln(n ln−2 n/2) = ln n − 2 ln ln n − ln 2 = (1 − o(1)) ln n (23)

Thus
u−1
X xi 1 + o(1) u−1
X
(ln 2) ≤ xi (24)
i=0
ln(xi /2) (ln n)(ln 2) i=0
Now x0 = n and xi ∼ n2−i (indeed, to be totally formal, xi ≤ n2−i + 1) so
that
u−1
X
xi ≤ 2n(1 + o(1) (25)
i=0

and (22) gives


n 2
π(n) ≤ (1 + o(1)) (26)
ln n ln 2
Selecting the Split: When we chose u above there was a lot of room
but still, care had to be taken. Knowing the answer in advance helps.
Suppose we let u be the first index with xu < S and consider which values
of S might work. It helps (as is frequently the case) to know 3 that π(n) =
Θ(n/ ln n). In the argument we will be adding S and so we want S =
o(n/(lnn)). But also the densities are going down in i when we look at
π(xi ) − π(xi+1 ) and we want them all to be (1 + o(1))/(ln n). As the last
one will be ∼ 1/ ln(S) we will want ln(S) ∼ ln(n) which in turn requires
S = n1−o(1) . Indeed, any S = n1−o(1) with S ≪ (n/(ln n) could have been
used. Looking ahead at the argument we will be adding S. This leads us to
require that S = o(n/ ln n). Having finished the argument it is instructive
to look back. The main intervals are roughly [n, n/2), [n/2, n/4), . . .. In the
first interval the upper bound for the density of primes from (19) is roughly
2/(ln n)(ln 2). This upper bound continues down to S, as ln(S) ∼ ln(n).
Thus the upper bound on the total number of primes is at most S (which
we choose to be negligible) plus what the number of primes would be if
each interval had prime density ln22 ln1n . The intervals total at most n values
(actually a bit less since we cut it off at S) and so the main contribution to
the prime count is ∼ ln2n lnnn .

1.4 PMT with Constant


Note: This section gets quite technical and should be considered optional.
Here we show Theorem 1.4. That is, we assume that there is a constant
c such that π(n) ∼ c(n/(ln n) and then show that c must be 1. It is a big if.
A priori, from Theorems 1.2,1.3 the ratio of π(n) to n/(ln n) could oscillate
between two positive constants, never approaching a limit.
We consider the factorization (11) more carefully. Our goal will be to
show that if c 6= 1 then the left and right hand sides cannot match. We split
the primes from 1 to n into intervals. We shall let K be a large but fixed
3
Actually, a good hunch is useful. If the hunch turns out to be wrong the calculations
will not come out as you wanted.
constant. (More about just how large later.) For 1 ≤ i < K let Pi denote
the set of primes p with
n n
<p≤ (27)
i+1 i
n
and let SP (small primes) denote the set of primes p with p < K . Let
Vi , 1 ≤ i < K denote the contribution of the p ∈ Pi to the factorization
α
(11). That is, Vi is the product of pj j in (11), where pj is restricted to Pi .
Similarly let VSP denote the contribution of the p ∈ SP to the factorization
α
(11). That is, Vi is the product of pj j in (11), where pj is restricted to SP .
We first show that SP makes a relatively small contibution to (11).
There are ≤ π(n/K) primes p ∈ SP and each (12) contributes at most a
factor of n so that VSP ≤ nπ(n/K) . From Theorem 1.3 gives π(n/K) <
(2 ln 2) + o(1))(n/K)/ ln(n/K). With K fixed, ln(n/K) ∼ ln(n) so that
π(n/K) < (ln 2 + o(1))(n/K)/ ln(n). Thus (27),

VSP < n(2 ln 2+o(1))(n/K)/ ln(n) = 2(2n/K)(1+o(1)) (28)

so that
2n ln 2
ln(VSP ) < (1 + o(1)) (29)
K
While this is not a small number in absolute terms it will be relatively
small compared to the total contribution which is 2n(1+o(1)) .
n
For 1 ≤ i < K we now look at Vi . As all primes considered have p > K

and K is fixed they have p > n. Thus the sum of Theorem 1.5 has only
one term. Theorem 1.6 with a = n/2 is then simply
!
n
vp ( = ⌊n/p⌋ − 2⌊n/2p⌋ (30)
n/2

This is either zero or one and is one precisely when ⌊n/p⌋ is odd. We
have designed Pi so that ⌊n/p⌋ = i for p ∈ Pi . When i is even no primes
p ∈ Pi appear in the factorization (11) (or, the same thing, they appear with
exponent zero) and so Vi = 1. (For example, with n7 < p ≤ n6 , n! has six
factors of p and (n/2)!2 has twice three factors of p and they all cancel.)
Now suppose 1 ≤ i < K is odd. Then Vi is simply the product of all
n
primes p ∈ Pi . Each such prime p lies between K and n and so can be
considered p = n 1+o(1) . The number of such primes is π(n/i) − π(n/(i + 1)).
In this range ln(n/i) ∼ ln n. Our assumption for Theorem ww3 then gives
that π(n/i) ∼ c i lnn n and that that π(n/(i + 1) ∼ c (i+1)n ln n . We deduce
that the number of primes is ∼ c lnnn ( 1i − i+1
1
. (Caution: Subtraction in
Asymptopia is dangerous! It is critical here that i ≤ K and that K is a
fixed constant, so 1i and i+1
1
is a positive constant. Were, say, K = ln ln n
we could not do the subtraction. With i ∼ (ln ln n)/2, for example, the
asymptotics of π(n/i) and π(n/(i + 1) would be the same and so one could
not deduce the asymptotics of their difference!) Thus
1 1
Vi = nc(1+o(1))(n/(ln n))( i − i+1 ) (31)

and
1 1
ln(Vi ) ∼ cn( − ) (32)
i i+1
From the factorization (11) Then
!!
n X
ln = ln VSP + ln(Vi ) (33)
n/2

For convenience, assume K = 2T is even so we can write the odd i < K as


2j − 1, 1 ≤ j ≤ T . From Chapter xxx, the left hand side is ∼ n ln 2. Thus
1 1
)j = 1T (
X
(1 + o(1))n ln 2 = cn(1 + o(1)) − ) + ln VSP (34)
2j − 1 2j
Dividing by n
2T −1
X (−1)k+1 1
(1 + o(1))(ln 2) = c(1 + o(1)) + ln VSP (35)
k=1
k n

We need 4 the fact that



X (−1)k+1 1 1 1
ln 2 = =1− + − + ... (36)
k=1
i 2 3 4

We can now see the idea. The ln(VSP ) will be negligible and (35) becomes
ln 2 = c(ln 2). The actual argument consists of eliminating all c 6= 1.
P −1 (−1)k+1
Suppose c > 1. Select K = 2T so that c 2T k=1 k > ln 2. As
ln VSP ≥ 0 the right hand side of (35) would be bigger than the left hand
side.
Suppose c < 1. Applying the upper bound (29), the right hand side
P −1 (−1)k+1
of (35) would be at most c 2T k=1 k + 2Kln 2
. As K → ∞, this sum
approaches c ln 2 which is less than ln 2. Thus we may select K 5 so that
4
Again, from Calculus!
5
A subtle wrinkle here, while we examine behavior as K → ∞ we select K a constant,
dependent only on c.
this sum is less than ln 2. But now the right hand side of (35) would be
smaller than the left hand side.
Both assumptions led to a contradiction and since we assummed that c
existed, it must be that c = 1.

1.5 Telescoping
Suppose we have a reasonable function f (x) and we wish to asymptotically
P
evaluate p≤n f (p). We assume the Prime Number Theorem 1, giving the
asymptotics of π(s) as s → ∞. On an intuitive level we think of 1 ≤ s ≤ n
as being prime with “probability” π(s)/s ∼ 1/(ln s). Then s, 1 ≤ s ≤ n
would contribute f (s)/(ln s) to the sum and p≤n f (p) would be roughly
P

s≤n f (s)/(ln s). This is not a proof, integers are either prime or they
P

aren’t, yet surprisingly we can often get this intuitive result. The key is
called telescoping. We write
X n
X
f (p) = f (s)(π(s) − π(s − 1)) (37)
p≤n s=2

Reversing sums (and noting π(1) = 0)


n
X n−1
X
f (s)(π(s) − π(s − 1)) = f (n)π(n) + π(s)(f (s) − f (s + 1)) (38)
s=2 s=2

While (38) its effectiveness depends on our ability to asymptotically cal-


culate the sum. An important success is when f (s) = 1s , we ask for the
asymptotics of
X1
F (n) = (39)
p≤n
p

The first term of (38) is then ∼ n1 lnnn = o(1). The sum is asymptotically
P s 1 P 1
ln s s(s+1) ∼ s ln s , the sum from s = 1 to n − 1. From Chapter xxx,

n−1 n
1 dx
X Z
sin = ln ln n (40)
s=2
s ln s 1 x ln x

That is, F (n) ∼ ln ln n. For another example, take f (s) = s so that F (n) =
p≤n p. Then
P

n−1
n2 n−1 s
X Z
F (n) = nπ(n) − π(s) ∼ − ds (41)
s=2
ln n 2 ln s
While the integrand cannot be precisely integrated we can handle it in
Asymptopia. Our notion is that ln s ∼ ln n for “most” 2 ≤ s ≤ n − 1.
We split the integral at some n1−o(1) , let us take u(n) = n ln−10 n for defi-
niteness. For u(n) ≤ s, ln(s) ≥ ln n − 10 ln ln n ∼ ln n so that
n−1 s n−1 s n2
Z Z
ds ∼ ds ∼ (42)
u(n) ln s u(n) ln n 2 ln n
s
For s ≤ u(n) we bound ln s ≤ s so that
u(n) s u(n) n2
Z Z
ds ≤ sds ∼ (43)
2 ln s 0 2 ln20 n
As the upper bound (43) is o(n2 / ln n) it has a negligible effect and the total
integral
n2
Z n−1
s
ds ∼ (44)
2 ln s 2 ln n
Subtracting, (41) gives
X n2 n2 n2
p∼ − ∼ (45)
p≤n
ln n 2 ln n 2 ln n

You might also like