You are on page 1of 5

Working With Prime Factorizations

The Unique Factorization Theorem tells us that for any integer n 2, if p1 , p2 , . . . , pk are
all the distinct primes that divide n, then we may express
n = p1 1 p2 2 pk k ,
where 1 , 2 , . . . , k N. For example, the prime divisors of 80262 are 2, 3, 7 and 13, and,
in particular, 80262 = 21 32 73 131 .
Note that in the unique prime factorization of 80262, we cannot use primes such as 5, 11
or 17 as they do not divide 80262. However, if we are willing to give up on the uniqueness
of the factorization, then we may write 80262 = 21 32 50 73 110 131 170 . The
key here is that 50 , 110 and 170 are all equal to 1, so their inclusion in the product has not
changed the overall answer. Nevertheless, this has now allowed us to use a larger list of
primes in the factorization of 80262, at the cost of losing the guarantee that these primes
will divide 80262.
In general, given any integer n 2, if we have a large enough list of distinct primes
p1 , p2 , . . . , pm that includes all the prime divisors of n, but may also include primes that
dont divide n, then we are allowed to express a (non-unique) prime factorization of n using
all the primes in this list by saying
n = p1 1 p2 2 pmm ,
where 1 , 2 , . . . , m are non-negative integers. The next proposition uses this idea to list
all of the positive divisors of a positive integer.

Proposition 1

(Divisors From Prime Factorization (DFPF))


Let n > 1 be an integer and d N. If
n = p1 1 p2 2 pk k
is the unique prime factorization of n into powers of distinct primes p1 , p2 , . . . , pk , where
the integers 1 , 2 , . . . , k 1, then d is a positive divisor of n if and only if a (non-unique)
prime factorization of d is given by
d = pd11 pd22 pdkk where 0 di i for i = 1, 2, . . . , k

Proof: Assume n = p1 1 p2 2 pk k , where p1 , p2 , . . . , pk are distinct primes and the integers


1 , 2 , . . . , k 1.
In the case when d = 1, we may express 1 = p01 p02 p0k . Since 1 is a positive divisor of n,
the proposition is true for d = 1.
Otherwise, suppose d 2. Then, by the Unique Factorization Theorem, the number d will
have its own distinct prime factors q1 , q2 , . . . , qm , and thus can be expressed as
dm
d = q1d1 q2d2 qm
,

where the integers d1 , d2 , . . . , dm 1. We will now prove the conclusion of the given
proposition by proving each direction of the if and only if statement.
1

00

Using the prime factorizations above, if d | n then





dm
| p1 1 p2 2 pk k .
q1d1 q2d2 qm

Using a reasoning similar to the one in the proof of UFT, this can only happen when
m k, and (after rearranging, if necessary) q1 = p1 , q2 = p2 , . . . , qm = pm and that
1 d1 1 , 1 d2 2 , . . . , 1 dm m . Hence we have
d = pd11 pd22 pdmm .
Since m k, there may be some primes pm+1 , pm+2 , . . . , pk leftover from the list of prime
factors for n. In that case, we may now include these primes in a prime factorization by
expressing
d = pd11 pd22 pdmm pdkk ,
where dm+1 = dm+2 = = dk = 0. As 1 , 2 , . . . , k 1, we have been able to write
d = pd11 pd22 pdkk where 0 di i for i = 1, 2, . . . , k.
=: Suppose a (non-unique) prime factorization satisfies the condition d = pd11 pd22 pdkk
where 0 di i for i = 1, 2, . . . , k. Then let us define a rational number q such that
q = nd . Using prime factorizations of n and d, we get
q=

p1 1 p2 2 pk k
pd11 pd22

pdkk

(1 d1 ) (2 d2 )
( d )
p2
pk k k .

= p1

( d )

Since for each i = 1, 2, . . . , k we are given i di , we (i di ) 0 and hence pi i i is an


( d ) ( d )
( d )
integer. Therefore p1 1 1 p2 2 2 pk k k is a product on integers, so q is an integer.
This means n = qd, where q is an integer, so d | n.

Self Check 1

Let p1 , p2 , . . . , pk be distinct times and q1 , q2 , . . . , q` also be a list of distinct primes. Prove


that for non-negative integers 1 , 2 , . . . , k and d1 , d2 , . . . , d` , if



q1d1 q2d2 q`d` | p1 1 p2 2 pk k ,
then ` k and (after rearranging, if necessary) q1 = p1 , q2 = p2 , . . . , q` = p` and, moreover,
d1 1 , d2 2 , . . . , d` ` .

Example 1

(Using Divisors From Prime Factorization)


What are the positive divisors of 72?
We will use Divisors From Prime Factorization. Since
72 = 23 32
the positive divisors of a are integers of the form
d = 2d1 3d2 where 0 d1 3 and 0 d2 2
The possibilities are
20 30 = 1 21 30 = 2 22 30 = 4 23 30 = 8
20 31 = 3 21 31 = 6 22 31 = 12 23 31 = 24
20 32 = 9 21 32 = 18 22 32 = 36 23 32 = 72

Exercise 1

Using Divisors From Prime Factorization, list all of the positive factors of 45.

Exercise 2

Show that the number of positive divisors of an integer n, whose unique prime factorization
is
n = p1 1 p2 2 pk k ,
is given by (1 + 1)(2 + 1) (k + 1).
Now that we have a method to obtain all the positive divisors of any positive integer using
its prime factorization, we may expect to use this method to calculate the GCD on two
integers a, b N. First, note that given a, b N, since there are infinitely many primes
but only a finite number of prime factors of a and b, we may produce a large enough list of
distinct primes, say p1 , p2 , . . . , pk , that contain all the prime divisors of both a and b. This
provides us with (non-unique) prime factorizations of both a and b, respectively, expressed
in terms of the primes p1 , p2 , . . . , pk as
a = p1 1 p2 2 pk k , and
b = p1 1 p2 2 pk k ,
where 1 , 2 , . . . , k and 1 , 2 , . . . , k are non-negative integers.

Proposition 2

(GCD From Prime Factorization (GCD PF))


If
a = p1 1 p2 2 pk k
and
b = p1 1 p2 2 pk k
are (non-unique) prime factorizations of a and b, where the primes are distinct and some of
the exponents may be zero, then
gcd(a, b) = pd11 pd22 pdkk where di = min{i , i } for i = 1, 2, . . . , k

Proof: Assume that a = p1 1 p2 2 pk k and b = p1 1 p2 2 pk k , for distinct primes p1 , p2 , . . . , pk


and non-negative integer exponents.
Consider d N given by d = pd11 pd22 pdkk where di = min{i , i } for i = 1, 2, . . . , k. Since
min{i , i } i as well as min{i , i } i for each i = 1, 2, . . . , k, according to Divisors
From Prime Factorization (DFPF ), d | a and d | b.
Consider some positive integer c such that c | a and c | b. According to DFPF, a prime
factorization of c is
c = p11 p22 pkk ,
where for each i = 1, 2, . . . , k, 0 i i as c | a and 0 i i as c | b. On the other
hand, for each i = 1, 2, . . . , k, di = i if i i , otherwise di = i , which means 0 i di .
Then, once again by DFPF, c | d, so Bounds By Divisibility (BBD) gives us c d. Note
that a similar analysis would apply to all negative common divisors of a and b.
Consequently, the definition of GCD, d = gcd(a, b).
3

Example 2

(Using GCD From Prime Factorization)


What is gcd(24750, 434511)?
Since
24750 = 21 32 53 111 = 21 32 53 70 111 190
and
434511 = 33 71 112 191 = 20 33 50 71 112 191 ,
gcd(24750, 434511) = 2min{1,0} 3min{2,3} 5min{3,0} 7min{0,1} 11min{1,2} 19min{0,1}
= 20 32 50 71 112 190
= 7623

Though this method of finding the GCD works well enough on small examples, but for
larger numbers, this method is very slow an inefficient. Nevertheless, it is an important
theoretical tool that can be used to prove other propositions.

Exercise 3

Use GCD PF to compute gcd(33 51 74 131 , 52 77 131 232 ).

More Examples
1. This question deals with prime factorizations.
(a) Write out the prime factorizations of 12936 and 16380.
(b) Using part (a), determine gcd(12936, 16380).
Solution:
(a)
12936 = 23 31 72 111
16380 = 22 51 32 71 131
(b) gcd(12936, 16380) = 22 31 71 = 84

Problems
1. Prove that if p <= n, then p does not divide n! + 1.
2. Let n >= 0. What is the power of 2 in the prime factorization of (2n )! ? Prove that
you have the correct value.
3. An integer n is perfect if the sum of all of its positive divisors (including 1 and itself)
is 2n.
(a) Is 6 a perfect number? Give reasons for your answer.
4

(b) Is 7 a perfect number? Give reasons for your answer.


(c) Prove the following statement:
If k is a positive integer and 2k 1 is prime, then 2k1 (2k 1) is perfect.
4. Note that k divides n! + k for each k <= n. Use this fact to show that, for all positive
integers m, there exist consecutive primes which are at least m apart.
5. Let a, b and d be positive integers. Use GCD From Prime Factorization (GCD PF )
to prove that for all n N, if d = gcd(a, b) then gcd(an , bn ) = dn .
You may use the fact that for all non-negative integers and ,
min{n , n } = n min{, }.

You might also like