0% found this document useful (0 votes)
110 views23 pages

Intermediate Number Theory Lesson 5 Prime Factorizations

The document is a transcript of a class on Intermediate Number Theory, focusing on prime factorizations and their applications. It discusses the Fundamental Theorem of Arithmetic, various mathematical problems involving prime numbers, and the concept of podprod numbers. The class includes interactive discussions with students and problem-solving techniques related to number theory concepts.

Uploaded by

ss240103635
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)
110 views23 pages

Intermediate Number Theory Lesson 5 Prime Factorizations

The document is a transcript of a class on Intermediate Number Theory, focusing on prime factorizations and their applications. It discusses the Fundamental Theorem of Arithmetic, various mathematical problems involving prime numbers, and the concept of podprod numbers. The class includes interactive discussions with students and problem-solving techniques related to number theory concepts.

Uploaded by

ss240103635
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

6/8/22, 9:59 AM 3085 Intermediate Number Theory

Intermediate Number Theory (3085)


Joshua Zucker

Thursday
Apr 28, 2022 - Jul 14, 2022
7:30 - 9:00 PM ET (4:30 - 6:00 PM PT)

Overview
Week 5 (May 26) Class Transcript - Prime Factorizations
< Go back to the class overview page
Copyright © AoPS Incorporated. This page is copyrighted material. You can view and print this page for your own use, but you
cannot share the contents of this file with others.
Display all student messages • Show few student messages • Hide student messages
joshuazucker 2022-05-26 19:29:48
Intermediate Number Theory
Week 5: Prime Factorizations

joshuazucker 2022-05-26 19:30:09


Prime factorization is so important to number theory that the fact that it exists and is unique for each positive integer is often
referred to as the Fundamental Theorem of Arithmetic.

joshuazucker 2022-05-26 19:30:21


Last week you saw it used a lot for deriving formulas for functions like the number or sum of divisors.

joshuazucker 2022-05-26 19:30:40


I was busily helping with the opening of the first Montessori preschool for lobsters in Boston.

joshuazucker 2022-05-26 19:30:44


Today, we'll see it applied in more settings and to other functions in number theory.

joshuazucker 2022-05-26 19:30:52


BASIC USE OF PRIME FACTORIZATION

joshuazucker 2022-05-26 19:30:56


Let m/n, in lowest terms, be the probability that a randomly chosen positive divisor of 1099 is an integer multiple of 1088 . Find
m + n.

joshuazucker 2022-05-26 19:32:05


How do we start here?

MathHayden 2022-05-26 19:32:10


prime factorize 10^99 and 10^88

joshuazucker 2022-05-26 19:32:16


Since the prime factorization of 1099 is 299 599 , its divisors take the form 2a 5b where 0 ≤ a, b ≤ 99.

joshuazucker 2022-05-26 19:32:21


When is such a divisor a multiple of 1088 ?

Andrew_Dou 2022-05-26 19:32:49


when a,b>=88

Eric1219 2022-05-26 19:32:49


a,b>=88

MathHayden 2022-05-26 19:32:49


exponents of 2 and 5 are both >=88

joshuazucker 2022-05-26 19:33:03


For 2 to be a multiple of 1088 , we must have a, b
a b
5 ≥ 88.

https://artofproblemsolving.com/class/3085-intermediate-numbertheory/transcript/48014 1/23
6/8/22, 9:59 AM 3085 Intermediate Number Theory

joshuazucker 2022-05-26 19:33:10


How many such a, b are there?

vanlucas 2022-05-26 19:33:34


12

Andrew_Dou 2022-05-26 19:33:34


12 a and 12 b for a total of 144 total ways

MathHayden 2022-05-26 19:33:34


12 for a and 12 for b -> 144

joshuazucker 2022-05-26 19:33:37


The number of choices of a with 88 ≤ a ≤ 99 is 12. Similarly there are 12 choices for b. So there are 144 pairs (a, b).

joshuazucker 2022-05-26 19:33:59


However, we're asked for a probability. So far we've only computed the number of divisors of 10 which are a multiple of 10 To
99 88
.

turn that into a probability, we need to answer another question too: How many total divisors of 10 are there?
99

Eric1219 2022-05-26 19:34:26


10000

Andrew_Dou 2022-05-26 19:34:26


100*100

andlind 2022-05-26 19:34:26


10000

joshuazucker 2022-05-26 19:34:29


We have (99 + 1)(99 + 1) = 10000 total divisors of 1099 = 2
99
5
99
.

gladIasked 2022-05-26 19:34:34


634?

joshuazucker 2022-05-26 19:34:36


So the probability is

4 2 2
144 2 3 3 9
= = =
4 4 4
10000 2 5 5 625

and the answer is 634.

joshuazucker 2022-05-26 19:34:45


Okay, so I didn't really need prime factorization for that last step, but on a contest when you have to find the simplified form of a
fraction with large numbers, using the prime factorization to see what to divide out can be a way of avoiding mistakes.

joshuazucker 2022-05-26 19:35:05


This problem showed some basic ways in which prime factorization meshes with concepts like one number dividing another or
being a multiple of another. As long as you had these basic ideas down, there was nothing too clever that was needed.

joshuazucker 2022-05-26 19:35:11


For each positive integer m > 1, let P (m) denote the greatest prime factor of m. For how many positive integers n is it true that
both P (n) = √n and P (n + 48) = √n + 48?

joshuazucker 2022-05-26 19:35:27


This problem is going to require a bit of exploration. It's important to begin mathematical exploration on solid footing, so let's
collect some facts.

joshuazucker 2022-05-26 19:35:31


What facts can we derive from the problem statement?

vanlucas 2022-05-26 19:35:58


n and n + 48 are perfect squares

https://artofproblemsolving.com/class/3085-intermediate-numbertheory/transcript/48014 2/23
6/8/22, 9:59 AM 3085 Intermediate Number Theory

joshuazucker 2022-05-26 19:36:03


We know that n must be a perfect square in order for the square root of n to be an integer. The same is true of n + 48.

joshuazucker 2022-05-26 19:36:08


And the square roots of n and n + 48 aren't just any integers. What do we know about them?

mathfunyay 2022-05-26 19:36:56


They are prime!

Lucasfunnyface 2022-05-26 19:36:56


they are prime

euler12345 2022-05-26 19:36:56


They are prime

joshuazucker 2022-05-26 19:37:00


We know that n and n + 48 are squares of prime integers, since P (m) is defined to always be a prime.

joshuazucker 2022-05-26 19:37:05


So let's introduce some new variables to express this. Let p and q be primes such that p2 = n and q 2 = n + 48.

joshuazucker 2022-05-26 19:37:19


The next step I can think of is a good idea for a couple of reasons. What would you do next?

euler12345 2022-05-26 19:37:54


Subtract the equations and factor the difference of squares

Andrew_Dou 2022-05-26 19:37:54


2 2
q − p = 48 ⟹ (q − p)(q + p) = 48

mathfunyay 2022-05-26 19:37:54


How about difference of squares?

joshuazucker 2022-05-26 19:38:01


Subtracting these equations is a great idea. It eliminates one variable (namely n), and gets us a difference of squares too!

joshuazucker 2022-05-26 19:38:08


Now we have

2 2
q − p = 48.

joshuazucker 2022-05-26 19:38:15


How can we work with this Diophantine equation?

Mission-IMO 2022-05-26 19:38:48


factor the left side, then prime factorize 48

MathHayden 2022-05-26 19:38:48


factorize with difference of squares -> (q-p)(q+p)=48

lihao_david 2022-05-26 19:38:48


factor it into (q+p)(q-p)

joshuazucker 2022-05-26 19:38:58


More factorization, algebraically and numerically into primes!

joshuazucker 2022-05-26 19:39:07


Here we notice a difference of squares, so we are happy to rewrite our equation: (q + p)(q − p) = 48.

joshuazucker 2022-05-26 19:39:21


Then 48 so it has 10 factors, or five pairs of factors.
4
= 2 ⋅ 3

joshuazucker 2022-05-26 19:39:32

https://artofproblemsolving.com/class/3085-intermediate-numbertheory/transcript/48014 3/23
6/8/22, 9:59 AM 3085 Intermediate Number Theory
Let's list them all:

48 ⋅ 1 = 48, 24 ⋅ 2 = 48, 16 ⋅ 3 = 48, 12 ⋅ 4 = 48, 8 ⋅ 6 = 48.

joshuazucker 2022-05-26 19:39:49


We know that p, q are positive so q + p is bigger than q − p, so the same pairs in the other order won't apply.

joshuazucker 2022-05-26 19:39:58


For which of these pairs of divisors are there prime numbers p and q such that the sum and difference of the primes are equal to
the divisors in the pair?

thrujet 2022-05-26 19:41:03


The ones where both factors are even?

MathHayden 2022-05-26 19:41:07


the two factors must both be even otherwise q is not an integer

joshuazucker 2022-05-26 19:41:26


Yeah, both factors must be even (or both odd, but that won't give 48) for p and q to be integers. So that eliminates two
possibilities.

joshuazucker 2022-05-26 19:41:36


The others give us integers, but we need to check if the resulting numbers are prime.

Eric1219 2022-05-26 19:41:43


24 and 2

lihao_david 2022-05-26 19:41:43


24 * 2

MathHayden 2022-05-26 19:41:43


24*2 -> 13,11

joshuazucker 2022-05-26 19:41:48


We now examine three systems of equations:

q + p = 24 and q − p = 2 ⟹ (p, q) = (11, 13),

q + p = 12 and q − p = 4 ⟹ (p, q) = (4, 8),

q + p = 8 and q − p = 6 ⟹ (p, q) = (1, 7).

joshuazucker 2022-05-26 19:41:53


Since only one of the systems of equations has prime solutions, there is only one pair of primes p and q whose squares differ by
48. Indeed,

2 2
13 − 11 = 169 − 121 = 48.

joshuazucker 2022-05-26 19:41:59


The only solution is n = p2 = 121. (So, the answer to the question "How many positive integers?" is 1.)

joshuazucker 2022-05-26 19:42:07


By a proper divisor of a natural number n we mean a positive integral divisor other than the number n itself. A natural number
greater than 1 will be called podprod if it is equal to the product of its distinct proper divisors. What is the sum of the first ten
podprod numbers?

joshuazucker 2022-05-26 19:42:46


To get a feel for what numbers can be podprod, let's start by thinking in general about what happens when you multiply together all
the divisors of a number.

joshuazucker 2022-05-26 19:42:51

https://artofproblemsolving.com/class/3085-intermediate-numbertheory/transcript/48014 4/23
6/8/22, 9:59 AM 3085 Intermediate Number Theory
Is there a general way that we can express that product?

joshuazucker 2022-05-26 19:43:52


Let's try looking at 30 as an example. First, how many positive divisors does 30 have?

finevulture 2022-05-26 19:44:13


8

lihao_david 2022-05-26 19:44:13


8

Andrew_Dou 2022-05-26 19:44:13


8

joshuazucker 2022-05-26 19:44:16


Since 30 the total number of positive divisors is (1 + 1)(1 + 1)(1 + 1)
1 1 1
= 2 ⋅ 3 ⋅ 5 , = 8.

joshuazucker 2022-05-26 19:44:19


As we did last week, we write τ (n) to represent the total number of positive divisors of a natural number n. For instance,
τ (30) = 8.

joshuazucker 2022-05-26 19:44:25


Now, is there a nice way we can find the product of these divisors without just multiplying them all out by hand?

andlind 2022-05-26 19:45:01


τ (n)/2
n

lihao_david 2022-05-26 19:45:01


30^(8/2)

gatorcalculator 2022-05-26 19:45:01


Yes, do 30^4

joshuazucker 2022-05-26 19:45:04


We can group all the divisors into pairs whose product is 30:

1 ⋅ 30 = 30, 2 ⋅ 15 = 30, 3 ⋅ 10 = 30, 5 ⋅ 6 = 30.

joshuazucker 2022-05-26 19:45:10


τ (30)
Writing out these 2
pairs gives us a simple method for taking the product of all the divisors of 30. In multiplication, we can
τ (30)

always rearrange our products in these pairs and end up with a total product of 30
4
2
= 30 .

joshuazucker 2022-05-26 19:45:20


τ (30)

That's interesting! When we multiply together all the divisors of 30 we get 30 2


. Will the same thing happen for other numbers?
τ (n)

That is, is it true that for any n, the product of all the divisors of n is n 2
?

andlind 2022-05-26 19:46:28


yes

finevulture 2022-05-26 19:46:28


yes

mathfunyay 2022-05-26 19:46:28


Yes!

joshuazucker 2022-05-26 19:47:05


Yeah, we should worry about the case of perfect squares with an unpaired divisor.

joshuazucker 2022-05-26 19:47:10


Let's try thinking about the example n = 16 . How many divisors does 16 have?

gladIasked 2022-05-26 19:47:26

https://artofproblemsolving.com/class/3085-intermediate-numbertheory/transcript/48014 5/23
6/8/22, 9:59 AM 3085 Intermediate Number Theory
5

lihao_david 2022-05-26 19:47:26


5

MathHayden 2022-05-26 19:47:26


5

joshuazucker 2022-05-26 19:47:29


Since 16 has 5 positive divisors.
4
= 2 , 16

joshuazucker 2022-05-26 19:47:35


We have 1 ⋅ 16 = 16 and 2 ⋅ 8 = 16.

joshuazucker 2022-05-26 19:47:38


But we have no divisor to pair 4 with. Is that a problem for our formula?

vanlucas 2022-05-26 19:48:09


no

jacknbailey 2022-05-26 19:48:09


no

mathfunyay 2022-05-26 19:48:09


No!

joshuazucker 2022-05-26 19:48:13


Leaving out 4 just means that we have listed

τ (16) − 1

pairs, whose total product is

τ (16)−1

16 2
.

joshuazucker 2022-05-26 19:48:21


Since 4 we can multiply:
1/2
= 16 ,

τ (16)−1 τ (16)
5/2
4 ⋅ 16 2
= 16 2
= 16 .

joshuazucker 2022-05-26 19:48:24


So our original formula ended up still working, despite the fact that we couldn't pair up 4.

joshuazucker 2022-05-26 19:48:30


The same thing will happen for any perfect square! When you multiply together all the divisors of n except for √n, you will have
τ (n)
τ (n)−1

2
pairs. When you multiply √n back in, you will then end up with exactly n 2
as the product of all the divisors of n.

joshuazucker 2022-05-26 19:48:45


Another way to think about it is that √n is half of a pair (since it's just one number), and it contributes exactly half of a factor of n,
so even though it doesn't get paired up, it is still true that we get one factor of n for every pair of divisors of n.

joshuazucker 2022-05-26 19:48:50


What we have demonstrated is that for any positive integer, n, perfect square or not, the product of all the positive divisors of n is
τ (n)

equal to n 2
.

joshuazucker 2022-05-26 19:49:09


OK, now let's go back to thinking about our problem. We have an expression that represents the product of all of an integer's
positive divisors. How can we apply this to determining which numbers are podprod?

https://artofproblemsolving.com/class/3085-intermediate-numbertheory/transcript/48014 6/23
6/8/22, 9:59 AM 3085 Intermediate Number Theory

Captain_Z 2022-05-26 19:49:36


divide it by n

joshuazucker 2022-05-26 19:49:41


τ (n)

We can say that the product of an integer's proper divisors is n since we must leave n itself out of our product of divisors.
−1
2

joshuazucker 2022-05-26 19:49:44


Now what?

Andrew_Dou 2022-05-26 19:50:20


this must equal n

euler12345 2022-05-26 19:50:20


n equals this

thrujet 2022-05-26 19:50:20


That is equal to n

joshuazucker 2022-05-26 19:50:26


We set
τ (n)
−1
n 2
= n.

joshuazucker 2022-05-26 19:50:33


The exponent to n on each side must be equal, so

τ (n)
− 1 = 1 ⟹ τ (n) = 4,
2

(or we can take the logn of both sides to see this) and thus podprod numbers are those positive integers with exactly 4 positive
divisors.

joshuazucker 2022-05-26 19:50:36


What kinds of positive integers have exactly 4 positive divisors?

MathHayden 2022-05-26 19:51:14


p*q for primes p and q, or perfect cubes

euler12345 2022-05-26 19:51:14


products of 2 primes and cubes of primes

MathHayden 2022-05-26 19:51:14


perfect cubes of primes

joshuazucker 2022-05-26 19:51:27


Yup, perfect cubes of primes work, and products of two different primes.

joshuazucker 2022-05-26 19:51:34


We want to find the ten smallest such numbers.

joshuazucker 2022-05-26 19:52:07


So we list a bunch of 2 ⋅ q, 3 ⋅ q, and so on until we have big enough numbers to be sure we've found the smallest 10.

joshuazucker 2022-05-26 19:52:18


Then we throw in a couple small cubes.

joshuazucker 2022-05-26 19:52:38


My list got this far before I decided it was enough:

https://artofproblemsolving.com/class/3085-intermediate-numbertheory/transcript/48014 7/23
6/8/22, 9:59 AM 3085 Intermediate Number Theory
2 ⋅ 3 = 6

2 ⋅ 5 = 10

2 ⋅ 7 = 14

2 ⋅ 11 = 22

2 ⋅ 13 = 26

2 ⋅ 17 = 34

2 ⋅ 19 = 38

3 ⋅ 5 = 15

3 ⋅ 7 = 21

3 ⋅ 11 = 33

5 ⋅ 7 = 35

3
2 = 8
3
3 = 27
3
5 = 125

joshuazucker 2022-05-26 19:52:57


Going higher with any of these kinds of combinations will only produce higher numbers than the ten smallest on this list. We can
now take the sum

6 + 8 + 10 + 14 + 15 + 21 + 22 + 26 + 27 + 33 = 182.

joshuazucker 2022-05-26 19:53:14


GCDS AND LCMS

joshuazucker 2022-05-26 19:53:21


There are a number of ways of dealing with GCDs and LCMs, such as the Euclidean algorithm.

joshuazucker 2022-05-26 19:53:32


We can also use prime factorizations in cases where the factorization is easy enough to find:

joshuazucker 2022-05-26 19:53:36


Suppose we have two numbers a, b with prime factorizations

a1 a2 ak
a = p p ⋯p ,
1 2 k

b1 b2 bk
b = p p ⋯p ,
1 2 k

where ai , bi are nonnegative integers for 1 ≤ i ≤ k.

joshuazucker 2022-05-26 19:53:47


Notice I'm using the same sequence of primes for both numbers; I actually want to do this while allowing 0 as an exponent.

joshuazucker 2022-05-26 19:53:55


Let's try to compute gcd(a, b) using these factorizations.

MathHayden 2022-05-26 19:54:40


for each p the power with the least exponent

Andrew_Dou 2022-05-26 19:54:40


min(a1 ,b1 ) min(a2 ,b2 ) min(ak ,bk )
it is p1 p
2
…p
k

joshuazucker 2022-05-26 19:56:35

We set the exponent of each prime in the GC choose d1 so that pd1 is the highest power of p1 dividing both a and b. This
1

means that

d 1 ≤ a1 , d1 ≤ b1 .

https://artofproblemsolving.com/class/3085-intermediate-numbertheory/transcript/48014 8/23
6/8/22, 9:59 AM 3085 Intermediate Number Theory

joshuazucker 2022-05-26 19:56:42


The greatest value is d1 = min(a1 , b1 ).

joshuazucker 2022-05-26 19:56:48


We find that

min(a1 ,b1 ) min(a2 ,b2 ) min(ak ,bk )


gcd(a, b) = p p ⋯p .
1 2 k

joshuazucker 2022-05-26 19:57:05


We can do the same thing for the LCM, and find

max(a1 ,b1 ) max(a2 ,b2 ) max(ak ,bk )


lcm(a, b) = p p ⋯p .
1 2 k

joshuazucker 2022-05-26 19:58:07


So the GCDs take the minimum of the exponents in the prime factorization, and the LCMs take the maximum.

joshuazucker 2022-05-26 19:58:16


Here's a fact about GCDs and LCMs of two numbers that often comes in handy:

joshuazucker 2022-05-26 19:58:20


Show that for all positive integers a, b, we have

lcm(a, b) gcd(a, b) = ab.

joshuazucker 2022-05-26 19:58:35


We can prove this. When in doubt, prime factorize!

a1 a2 ak
a = p p ⋯p ,
1 2 k

b1 b2 bk
b = p p ⋯p ,
1 2 k

MathHayden 2022-05-26 19:59:39


lcm is the minimum a_k or b_k and the other one is the maxmimum, the product is ab

jacknbailey 2022-05-26 19:59:39


All the terms in the prime factorizations are either in the lcm factorization or the gcd factorization.

MatthewS192 2022-05-26 19:59:39


LCM is the product of the highest prime powers of a and b

joshuazucker 2022-05-26 19:59:50


Let's just focus on the exponent of one specific prime for the sake of simplicity, say p1 .

joshuazucker 2022-05-26 19:59:56


The exponent of p1 in the prime factorization of ab is a1 + b1 .

joshuazucker 2022-05-26 19:59:59


The exponent of p1 in the prime factorization of lcm(a, b) gcd(a, b) is max(a1 , b1 ) + min(a1 , b1 ).

joshuazucker 2022-05-26 20:00:12


When we pass to the exponents of prime factorization, multiplication of two numbers becomes addition of their exponents.
Similarly, exponentiation will become multiplication.

joshuazucker 2022-05-26 20:00:22


So we need to show that

https://artofproblemsolving.com/class/3085-intermediate-numbertheory/transcript/48014 9/23
6/8/22, 9:59 AM 3085 Intermediate Number Theory
max(a1 , b1 ) + min(a1 , b1 ) = a1 + b1 .

joshuazucker 2022-05-26 20:00:40


Let's call the bigger exponent a1 . If the other one is bigger, we get the same logic only with the letters swapped.

joshuazucker 2022-05-26 20:00:54


If a1 ≥ b1 , we know max(a1 , b1 ) = a1 and min(a1 , b1 ) = b1 . When we plug this in, we immediately get the identity we wanted to
show.

joshuazucker 2022-05-26 20:01:03


So we've shown the prime factorization of each side has the same exponent for p1 .

Andrew_Dou 2022-05-26 20:01:26


this generalizes to all pk

joshuazucker 2022-05-26 20:01:30


The same logic works for every prime pk so the two sides of the equation have the same prime factorization and are thus equal.

joshuazucker 2022-05-26 20:01:42


We're done!

joshuazucker 2022-05-26 20:01:57


Our work at the end was some simple addition. The original problem statement never actually used the addition operation. When
you have a number theory problem with only multiplication and exponentiation involved, invoking prime factorization becomes a
very powerful technique. It converts the multiplication of numbers into a smaller, simpler addition problem.

joshuazucker 2022-05-26 20:02:33


The three positive integers a, b, and c satisfy the equalities

2 2 2
gcd(ab, c ) = 20, gcd(ac, b ) = 18, gcd(bc, a ) = 75.

Compute the minimum possible value of a + b + c.

joshuazucker 2022-05-26 20:02:57


Hm, three numbers and all those different combinations seems to make things more complicated. How can we attack this
problem?

MatthewS192 2022-05-26 20:03:02


"When in doubt, prime factorize!"

joshuazucker 2022-05-26 20:03:08


That's a good motto! I like it.

Andrew_Dou 2022-05-26 20:03:10


prime factorize 20, 18 and 75

joshuazucker 2022-05-26 20:03:23


We can prime factorize those, and find the primes 2, 3, 5 are the only ones that occur there.

joshuazucker 2022-05-26 20:03:43


So, let's focus on those primes and then have a big lump of "everything else":

joshuazucker 2022-05-26 20:03:46


Let

a1 a2 a3
a = 2 3 5 x,

b1 b2 b3
b = 2 3 5 y,
c1 c2 c3
c = 2 3 5 z,

where x, y, and z are not divisible by any of 2, 3, and 5.

Captain_Z 2022-05-26 20:04:29

https://artofproblemsolving.com/class/3085-intermediate-numbertheory/transcript/48014 10/23
6/8/22, 9:59 AM 3085 Intermediate Number Theory
x,y and z are also relatively prime

euler12345 2022-05-26 20:05:00


wait... we want the minimum value, so do we really need the "everything else"?

joshuazucker 2022-05-26 20:05:14


Yup! Since we want the minimum possible value, that should mean x = y = z = 1 .

joshuazucker 2022-05-26 20:05:23


Now let's focus on one prime at a time.

Eric1219 2022-05-26 20:05:27


we have 2 , , and 3 ∗ 5
2 2 2
∗ 5 2 ∗ 3

joshuazucker 2022-05-26 20:05:53


We could do any of them. Let's try starting with 2.

joshuazucker 2022-05-26 20:06:00


Let's look at what our equations say in terms of the exponents of 2 in the prime factorizations. First, consider the equation

2
gcd(ab, c ) = 20.

joshuazucker 2022-05-26 20:06:06


In terms of a1 , b1 , and c1 , what is the exponent of 2 in the prime factorization of gcd(ab, c2 )? (Remember, a1 , b1 , and c1 are the
exponents of 2 in the prime factorizations of a, b, and c.)

Andrew_Dou 2022-05-26 20:06:59


it is at least 2 in both ab and c2

Andrew_Dou 2022-05-26 20:07:12


it is exactly two in ab or c2 and then it is at least 2 in the other expression

joshuazucker 2022-05-26 20:07:27


Yes! Another way to say the same things: The exponent of 2 in the prime factorization ab is a1 + b1 , and the exponent of 2 in the
prime factorization of c2 is 2c1 . So the exponent of 2 in the prime factorization of of gcd(ab, c2 ) is min(a1 + b1 , 2c1 ) .

joshuazucker 2022-05-26 20:07:37


Since gcd(ab, c2 ) = 20 and the exponent of 2 in the prime factorization of 20 is 2, we get the equation

min(a1 + b1 , 2c1 ) = 2.

joshuazucker 2022-05-26 20:07:46


OK, what about the other two equations gcd(ac, b2 ) = 18 and gcd(bc, a2 ) = 75? What similar equations do they give us when
we look at the exponents of 2 in the prime factorizations?

MathHayden 2022-05-26 20:09:01


min(a1+c1,2b1)=1, min(b1+c1,2a1)=0

joshuazucker 2022-05-26 20:09:31


Yup, we're still focusing on 2s so we are only learning about a1 , b1 , c1 for now.

joshuazucker 2022-05-26 20:09:55


All the information we have about powers of 2 in the prime factorization is contained in these three equations:

min(a1 + b1 , 2c1 ) = 2,

min(a1 + c1 , 2b1 ) = 1,

min(b1 + c1 , 2a1 ) = 0.

joshuazucker 2022-05-26 20:10:08


Yikes, this is kind of confusing!

https://artofproblemsolving.com/class/3085-intermediate-numbertheory/transcript/48014 11/23
6/8/22, 9:59 AM 3085 Intermediate Number Theory

joshuazucker 2022-05-26 20:10:42


There's probably a lot of ways to guess and check a solution, but we want to be sure that we have the smallest a + b + c in the
end, so we might want to pursue a more logical approach instead.

MathHayden 2022-05-26 20:10:49


b1+c1 and 2a1, one of those has to be 0

joshuazucker 2022-05-26 20:10:57


Huh, and what does the first equation mean about c1 ?

lihao_david 2022-05-26 20:12:03


its greater or equal to 1

andlind 2022-05-26 20:12:03


it is at least 1

jacknbailey 2022-05-26 20:12:03


*c1 ≥ 1

joshuazucker 2022-05-26 20:12:10


Because min(a1 + b1 , 2c1 ) = 2, we have a1 + b1 ≥ 2 and 2c1 ≥ 2. Hence c1 ≥ 1.

Captain_Z 2022-05-26 20:13:04


a1=0

Andrew_Dou 2022-05-26 20:13:04


so a1 = 0

MathHayden 2022-05-26 20:13:04


so a_1=0

joshuazucker 2022-05-26 20:13:13


Because min(b1 + c1 , 2a1 ) = 0, and b1 + c1 ≥ c1 ≥ 1, we have 2a1 = 0, so a1 = 0.

wengyt96 2022-05-26 20:13:43


b1 = 2, c1 = 1

joshuazucker 2022-05-26 20:14:22


The second equation is also nice. Since 2b1 is even, it can't be 1 and must therefore be greater. So a1 + c1 = 1 exactly, and c1
must be 1 no matter what.

joshuazucker 2022-05-26 20:14:46


On the other hand, b1 can now be anything at least 2 to make the first equation work.

joshuazucker 2022-05-26 20:14:55


To find the smallest value, though, we'll want to choose b1 = 2 .

joshuazucker 2022-05-26 20:15:04


So (a1 , b1 , c1 ) = (0, 2, 1). These are the smallest possible exponents of 2 in the prime factorizations of a, b, and c respectively.

joshuazucker 2022-05-26 20:15:14


I hope the other primes are a little easier!

joshuazucker 2022-05-26 20:15:19


The exponent of 3 in the prime factorizations of 20, 18, and 75 are 0, 2, and 1 respectively. Therefore, the GCD conditions become

min(a2 + b2 , 2c2 ) = 0,

min(a2 + c2 , 2b2 ) = 2,

min(b2 + c2 , 2a2 ) = 1.

joshuazucker 2022-05-26 20:15:23


Wait a second... doesn't this look familiar?

https://artofproblemsolving.com/class/3085-intermediate-numbertheory/transcript/48014 12/23
6/8/22, 9:59 AM 3085 Intermediate Number Theory

wengyt96 2022-05-26 20:15:45


oh yayyyy

lihao_david 2022-05-26 20:15:46


it's just the same as the above set just with different order

joshuazucker 2022-05-26 20:15:49


It's the same set of conditions we had before, just with the variables switched around a bit!

joshuazucker 2022-05-26 20:15:54


If you move the first line to the bottom, and then do the following replacements,

a 2 → c1 , c2 → b 1 , b 2 → a1 ,

it becomes exactly what we had before.

joshuazucker 2022-05-26 20:16:01


Since we got (a1 , b1 , c1 ) = (0, 2, 1) before, the exact same steps will get us (a2 , b2 , c2 ) = (2, 1, 0).

wengyt96 2022-05-26 20:16:17


same for 5

joshuazucker 2022-05-26 20:16:18


To save some time, I'll go ahead and tell you that the same pattern occurs when we look at the exponent of 5, and we'll get
(a3 , b3 , c3 ) = (1, 0, 2).

joshuazucker 2022-05-26 20:17:06


Plugging this into our prime factorizations, we get

0 2 1
a = 2 3 5 x = 45x,
2 1 0
b = 2 3 5 y = 12y,

1 0 2
c = 2 3 5 z = 50z.

Lucasfunnyface 2022-05-26 20:17:13


(45, 12, 50)

joshuazucker 2022-05-26 20:17:28


And we see we can have x = y = z = 1 to get the minimum possible values. This gets us

a + b + c = 45 + 12 + 50 = 107.

joshuazucker 2022-05-26 20:17:48


As we saw, even the most basic steps were enough to navigate our way through the system of min equations, despite how
intimidating they were. Remember to always keep doing something, and doing the simple or straightforward things first, when
you're feeling stuck.

joshuazucker 2022-05-26 20:17:54


Maybe you'll find some nice pattern!

joshuazucker 2022-05-26 20:18:08


One set of big numbers that are extremely easy to prime factorize are

joshuazucker 2022-05-26 20:18:10


FACTORIALS

joshuazucker 2022-05-26 20:18:36


We already have them mostly factorized as the product of a bunch of smallish integers, so that helps us fully prime factorize any
factorial.

joshuazucker 2022-05-26 20:19:19

https://artofproblemsolving.com/class/3085-intermediate-numbertheory/transcript/48014 13/23
6/8/22, 9:59 AM 3085 Intermediate Number Theory

For instance, we don't compute 6! and then factorize 720. Instead we compute 6 ⋅ 5 ⋅ 4 ⋅ 3 ⋅ 2 and
2
= 720 = (3 ⋅ 2) ⋅ 5 ⋅ 2 ⋅ 3 ⋅ 2

then collect the powers of each prime.

joshuazucker 2022-05-26 20:19:51


There's a convenient shortcut to finding the exponent of each prime in that final factorization.

joshuazucker 2022-05-26 20:19:53


For an arbitrary prime p and positive integer n, find the exponent of p in the prime factorization of n!.

joshuazucker 2022-05-26 20:20:41


How can we compute this? (Don't just tell me a formula; tell me how we could come up with a formula!)

joshuazucker 2022-05-26 20:21:03


A good start is to think about the factorial as the product of the first n integers:

1 ⋅ 2 ⋅ 3 ⋅ 4 ⋯ n.

joshuazucker 2022-05-26 20:21:05


We need to figure out how many total times p is multiplied into that expansion.

thrujet 2022-05-26 20:21:17


Isn't it like floor of n/p, plus floor of n/p^2, and so on?

Andrew_Dou 2022-05-26 20:21:17


∞ n
∑ ⌊ ⌋
i=1 p
i

vanlucas 2022-05-26 20:21:17


find the multiples of p

joshuazucker 2022-05-26 20:21:23


For starters, we can count the number of multiples of p. How many are there from 1 to n?

gatorcalculator 2022-05-26 20:22:06


Well we would have n/p(floor) factors of p

MathHayden 2022-05-26 20:22:06


floor(n/p)

Andrew_Dou 2022-05-26 20:22:06


floor(n/p)

joshuazucker 2022-05-26 20:22:09


It's the number you get when you divide n by p and round down to the next integer.

joshuazucker 2022-05-26 20:22:12


We can express this concisely with the floor function, which you might remember seeing last week.

joshuazucker 2022-05-26 20:22:17


The floor of x, written as ⌊x⌋, is equal to x rounded down to the next integer. There are ⌊n/p⌋ multiples of p from 1 to n.

joshuazucker 2022-05-26 20:22:29


Just counting the number of multiples of p won't get us the correct exponent.

joshuazucker 2022-05-26 20:23:01


For instance, in 6! there are three multiples of 2 (namely 6, 4, 2) but the power of 2 in the prime factorization is 24 , not 23 .

euler12345 2022-05-26 20:23:11


And then multiples of p2 's, p3 's

Andrew_Dou 2022-05-26 20:23:11


we need to count multiples of p2 , p3 etc. as well

jacknbailey 2022-05-26 20:23:11

https://artofproblemsolving.com/class/3085-intermediate-numbertheory/transcript/48014 14/23
6/8/22, 9:59 AM 3085 Intermediate Number Theory
we need to consider multiples of powers of p

joshuazucker 2022-05-26 20:23:47


Yeah, some of the integers in the product for n! might have more than one factor of p in their factorizations.

joshuazucker 2022-05-26 20:24:04


The multiples of p2 are exactly the numbers that have more than one factor of p in them. There are ⌊n/p2 ⌋ multiples of p2 from 1
to n.

joshuazucker 2022-05-26 20:24:32


OK, that's some progress. Let's summarize where we are so far.

Each multiple of p contributes one factor of p, and each multiple of p contributes two factors of p. Does that mean we have a total
2

of ⌊n/p⌋ + 2 ⌊n/p2 ⌋ factors of p?

Andrew_Dou 2022-05-26 20:25:55


no because we already counted each multiple of p2 once in counting the multiples of p

andlind 2022-05-26 20:25:55


no, the first factor of each multiple of p^2 was already counted in the multiples of p

jacknbailey 2022-05-26 20:25:55


no, only count duplicates once

joshuazucker 2022-05-26 20:26:10


No, that's overcounting the multiples of p2 ! Each multiple of p2 is also a multiple of p, so it was already counted once in ⌊n/p⌋ . So
we only need to count each multiple of p2 one more time to account for its two factors of p.

joshuazucker 2022-05-26 20:26:18


So we can add up ⌊n/p⌋ + ⌊n/p2 ⌋ .

finevulture 2022-05-26 20:26:23


no, there is p^3 and p^4 exc

joshuazucker 2022-05-26 20:26:30


We're not done, because we might still have more factors of p from multiples of p3 , or p4 , or some higher power of p. What do we
need to add to account for the multiples of p3 ?

Andrew_Dou 2022-05-26 20:27:41


floor(n/(p^3))

MathHayden 2022-05-26 20:27:41


[n/p^3]

mathfunyay 2022-05-26 20:27:41


Floor of n/(p^3)

joshuazucker 2022-05-26 20:27:43


Each multiple of p3 was already counted twice (once as a multiple of p and once as a multiple of p2 ), but we need to count it once
more since it has 3 factors of p. So we need to add ⌊n/p3 ⌋ to count each multiple of p3 one more time.

joshuazucker 2022-05-26 20:27:46


Similarly, to count the multiples of p4 we add ⌊n/p4 ⌋ , and so on.

MathHayden 2022-05-26 20:28:00


and then [n/p^4], [n/p^5], all they way up to infinity (it will become 0 eventually)

joshuazucker 2022-05-26 20:28:02


After accounting for all the different powers of p, we get the infinite sum

https://artofproblemsolving.com/class/3085-intermediate-numbertheory/transcript/48014 15/23
6/8/22, 9:59 AM 3085 Intermediate Number Theory
n n n n
⌊ ⌋ + ⌊ ⌋ + ⌊ ⌋ + ⌊ ⌋ + ⋯.
2 3 4
p p p p

joshuazucker 2022-05-26 20:28:07


That last line is our formula for the exponent of p in the prime factorization of n!; it is as simple as we'll be able to get it.

joshuazucker 2022-05-26 20:28:15

Once we reach a k for which pk all terms starting from ⌊ will be 0, so we can stop computing the sum there.
n
> n, ⌋
k
p

joshuazucker 2022-05-26 20:28:22


Let's do a quick test. In the prime factorization of 5!, what's the exponent of 2?

Captain_Z 2022-05-26 20:28:53


3

Mission-IMO 2022-05-26 20:28:53


3

Mahika_reddy 2022-05-26 20:28:53


3

joshuazucker 2022-05-26 20:28:56


Using our formula, the exponent is

5 5 5 5
⌊ ⌋ + ⌊ ⌋ + ⌊ ⌋ + ⌊ ⌋ + ⋯ = 2 + 1 + 0 + 0 + ⋯ = 3.
2 4 8 16

joshuazucker 2022-05-26 20:28:59


Indeed, we can verify that 5! = 120 is divisible by 8 but not 16.

joshuazucker 2022-05-26 20:29:54


These simple checks can catch a lot of errors, so don't be shy about doing them. The biggest difference for me to go from a kid
who likes math to one who does well on math contests was learning to do those quick checks constantly and find and fix my
mistakes.

joshuazucker 2022-05-26 20:30:01


Remember; it is much more important to know the methods and ideas behind deriving this formula than the formula itself.
Whether you do contests or research, many math problems will require unfamiliar techniques to solve, and you stand the best
chance of finding them if you know the ideas behind the facts that are familiar to you.

joshuazucker 2022-05-26 20:30:49


Then you know how to modify the calculation or formula when the situation is different! For instance, you might be given a
question like "What is the largest power of 5 that is a divisor of the product of the first 100 even integers?"

joshuazucker 2022-05-26 20:31:10


If you just know the formula, you're doomed. If you know where it comes from, then you can use the same idea to start counting
factors of 5.

joshuazucker 2022-05-26 20:31:26


On the other hand, sometimes you just need to use the formula...

joshuazucker 2022-05-26 20:31:28


How many zeroes does 100! end in when written in base 10?

thrujet 2022-05-26 20:32:23


Count the number of fives, because there are more fives than 2s

mathfunyay 2022-05-26 20:32:23


Min of exponents of 2 and 5

gatorcalculator 2022-05-26 20:32:28

https://artofproblemsolving.com/class/3085-intermediate-numbertheory/transcript/48014 16/23
6/8/22, 9:59 AM 3085 Intermediate Number Theory
count the number of powers of 5?

joshuazucker 2022-05-26 20:32:32


We need to figure out the maximum power of 10 that divides 100!.

joshuazucker 2022-05-26 20:32:46


To do that, we need the minimum of the exponent of 2 and the exponent of 5 in the prime factorization of 100!.

joshuazucker 2022-05-26 20:32:49


The exponent of 5 will be smaller; there are many more multiples of 2, 4, 8, … than multiples of 5, 25, 125, … .

lihao_david 2022-05-26 20:32:56


we need to only worry about 5 because there are plenty of twos

ndaashukla 2022-05-26 20:32:57


100/5 +100/25

joshuazucker 2022-05-26 20:32:59


So now we just use the formula we obtained for n = 100 and p = 5.

finevulture 2022-05-26 20:33:05


24

andlind 2022-05-26 20:33:05


24

gladIasked 2022-05-26 20:33:05


24

joshuazucker 2022-05-26 20:33:07


The exponent of 5 is

100 100 100


⌊ ⌋ + ⌊ ⌋ + ⌊ ⌋ + ⋯ = 20 + 4 + 0 + ⋯ = 24.
5 25 125

joshuazucker 2022-05-26 20:33:10


So our answer is 24.

joshuazucker 2022-05-26 20:33:44


For base 10 we only need to focus on the 5s, but what about base 12? We need twice as many 2s as 3s to get the zeros at the end,
so which one is in better supply? This takes some thought!

joshuazucker 2022-05-26 20:33:56


For all nonnegative integers n, k such that k ≤ n, show that

n!

k!(n − k)!

is an integer.

joshuazucker 2022-05-26 20:34:01


Many of you will probably recognize this as the binomial coefficient (nk).

joshuazucker 2022-05-26 20:34:12


It is certainly possible to prove it is an integer by showing that it counts something. That's the method I would generally
recommend!

joshuazucker 2022-05-26 20:34:14


However, this is Intermediate Number Theory, not Intermediate Counting. So let's try to find an alternate proof that instead uses
prime factorization. How can we recast the problem in that language?

MathHayden 2022-05-26 20:35:44


try prime factorization with primes p_i

https://artofproblemsolving.com/class/3085-intermediate-numbertheory/transcript/48014 17/23
6/8/22, 9:59 AM 3085 Intermediate Number Theory

Captain_Z 2022-05-26 20:35:44


"When in doubt, prime factorize"

joshuazucker 2022-05-26 20:36:00


So, let's consider some particular prime p.

joshuazucker 2022-05-26 20:36:22


What do we need to know about the powers of p in various places if our fraction is going to be an integer?

thrujet 2022-05-26 20:36:46


There more on top

joshuazucker 2022-05-26 20:36:50


More or equal, yeah.

mathfunyay 2022-05-26 20:36:59


The exponents have to all be nonnegative- you can uniquely prime factorize for rational numbers too but integer exponents.

Andrew_Dou 2022-05-26 20:36:59


the power of p in n! must be greater than or equal to the power of p in k!(n − k)!

joshuazucker 2022-05-26 20:37:10


Right. More precisely: We need to show that for an arbitrary prime p, the exponent of p in the prime factorization of

n!

k!(n − k)!

is nonnegative.

joshuazucker 2022-05-26 20:37:13


n!
The exponent of p in is the exponent of p in n!, minus the exponents of p in k! and (n − k)!.
k!(n − k)!

joshuazucker 2022-05-26 20:37:22


So?

mathfunyay 2022-05-26 20:37:53


Formulas?

joshuazucker 2022-05-26 20:37:56


We can use the formula we just derived for each of the factorials!

joshuazucker 2022-05-26 20:38:00


n!
After expanding out with the formula we derived, we get that the exponent of p in is
k!(n − k)!

n n n
⌊ ⌋ + ⌊ ⌋ + ⌊ ⌋ + ⋯
2 3
p p p

k k k
−(⌊ ⌋ + ⌊ ⌋ + ⌊ ⌋ + ⋯)
2 3
p p p

n − k n − k n − k
−(⌊ ⌋ + ⌊ ⌋ + ⌊ ⌋ + ⋯)
2 3
p p p

joshuazucker 2022-05-26 20:38:13


Oh dear. How can we prove that this is nonnegative? How can we even get started on such an infinite mess?

mathfunyay 2022-05-26 20:39:42


Just line up each for the exponents of p

jacknbailey 2022-05-26 20:39:42


Separate the p terms, the p2 terms, etc.

https://artofproblemsolving.com/class/3085-intermediate-numbertheory/transcript/48014 18/23
6/8/22, 9:59 AM 3085 Intermediate Number Theory

joshuazucker 2022-05-26 20:39:48


For a case like this where you might not see anything that can be done right away, trying to clean things up by doing something like
regrouping so that similar terms appear together is a good thing to start with.

joshuazucker 2022-05-26 20:39:50


Let's put together the floor terms with a common denominator.

n k n − k
(⌊ ⌋ − ⌊ ⌋ − ⌊ ⌋)
p p p

n k n − k
+(⌊ ⌋ − ⌊ ⌋ − ⌊ ⌋)
2 2 2
p p p

n k n − k
+(⌊ ⌋ − ⌊ ⌋ − ⌊ ⌋)
3 3 3
p p p

+⋯

joshuazucker 2022-05-26 20:40:00


Each group of three terms is of the form ⌊a + b⌋ − ⌊a⌋ − ⌊b⌋.

joshuazucker 2022-05-26 20:40:20


Can we do anything with this observation?

wengyt96 2022-05-26 20:41:18


can't be negative?

mathfunyay 2022-05-26 20:41:18


Show that floor of a+b is bigger than or equal to floor of a plus floor of b.

joshuazucker 2022-05-26 20:41:22


This quantity is always nonnegative. But why? We need to prove this.

joshuazucker 2022-05-26 20:41:33


How can we show ⌊a + b⌋ ≥ ⌊a⌋ + ⌊b⌋ for all real numbers a and b?

joshuazucker 2022-05-26 20:42:47


We want to show that ⌊a⌋ + ⌊b⌋ is smaller than or equal to something.

joshuazucker 2022-05-26 20:43:37


Well, By definition, we know that ⌊a⌋ ≤ a and ⌊b⌋ ≤ b, so

⌊a⌋ + ⌊b⌋ ≤ a + b.

That's something it's definitely less than (or equal to)! How does this help us?

Lucasfunnyface 2022-05-26 20:43:54


floor(a) <= a, floor(b) <= b, so floor (a) + floor(b) <= a + b, and then take the floor of both sides again

joshuazucker 2022-05-26 20:44:28


Yes! On the left side we have an integer that's less than or equal to some value, and therefore it's also less than or equal to the floor
of that value by definition of floor (again).

joshuazucker 2022-05-26 20:45:16


Or you can say the same thing by taking the floor of both sides. ⌊a⌋ + ⌊b⌋ is an integer that is less than or equal to a + b, so

⌊a + b⌋ ≥ ⌊a⌋ + ⌊b⌋,

as desired.

joshuazucker 2022-05-26 20:45:22

https://artofproblemsolving.com/class/3085-intermediate-numbertheory/transcript/48014 19/23
6/8/22, 9:59 AM 3085 Intermediate Number Theory
By repeated application of this property of floor functions,

n k n − k
(⌊ ⌋ − ⌊ ⌋ − ⌊ ⌋)
p p p

n k n − k
+(⌊ ⌋ − ⌊ ⌋ − ⌊ ⌋)
2 2 2
p p p

n k n − k
+(⌊ ⌋ − ⌊ ⌋ − ⌊ ⌋)
3 3 3
p p p

+⋯

is a sum of nonnegative numbers and thus nonnegative.

joshuazucker 2022-05-26 20:45:24


So the exponent in the prime factorization is nonnegative for every prime, and we're done.

joshuazucker 2022-05-26 20:46:01


This is admittedly a tricky argument to find if you are not already familiar with the property about ⌊a + b⌋, but we can see how this
problem guided us toward finding this solution. The simple principles in algebra of regrouping and trying to keep similar terms
together can help you to sniff these facts out yourself.

joshuazucker 2022-05-26 20:46:28


Show that for each positive integer n,

n
n
n! = ∏ lcm (1, 2, … , ⌊ ⌋) .
i
i=1

joshuazucker 2022-05-26 20:47:11


We're trying to show that these two things are equal. How can we get a handle on what they are? Is there a simpler thing we can
look at?

xixinyc 2022-05-26 20:48:02


factor

joshuazucker 2022-05-26 20:48:08


Specifically what factors do we look at?

Andrew_Dou 2022-05-26 20:48:10


take a prime p and determine it's exponent

joshuazucker 2022-05-26 20:48:14


When in doubt, prime factorize!

joshuazucker 2022-05-26 20:48:35


We can look at one prime at a time and see if we can prove that the exponent of that prime in the factorizaton of both sides is the
same.

joshuazucker 2022-05-26 20:48:47


So, let p be any prime.

joshuazucker 2022-05-26 20:48:51


How do we get started with this plan?

joshuazucker 2022-05-26 20:49:45


Maybe some folks aren't familiar with the notation here, so let's do an example with n = 3 .

joshuazucker 2022-05-26 20:49:51


On the left side we have 3!.

joshuazucker 2022-05-26 20:50:04


On the right side, we have the product of 3 numbers, for each value of i from 1 to 3.

https://artofproblemsolving.com/class/3085-intermediate-numbertheory/transcript/48014 20/23
6/8/22, 9:59 AM 3085 Intermediate Number Theory

joshuazucker 2022-05-26 20:50:31


When i is 1 we have lcm(1, 2, 3) which is 6.

joshuazucker 2022-05-26 20:50:49


When i is 2 or 3 we stop at the floor of 3/i which is 1, so we have lcm(1) which is just 1.

joshuazucker 2022-05-26 20:51:22


Then the big Π means to multiply them together: 6 ⋅ 1 ⋅ 1 = 6 .

joshuazucker 2022-05-26 20:51:28


So it works: 3! = 6.

Andrew_Dou 2022-05-26 20:51:36


the exponent of p in n! which we have a method for already

euler12345 2022-05-26 20:51:36


Write the formula we derived for the power of p in n!

joshuazucker 2022-05-26 20:51:56


OK, we can start with some arbitrary prime p and focus on the exponent of p in the factorization of both sides.

joshuazucker 2022-05-26 20:52:00


We saw earlier that the exponent of p in the left side is

n n
⌊ ⌋ + ⌊ ⌋ + ….
2
p p

joshuazucker 2022-05-26 20:52:28


Now the right side is the product of a bunch of lcms of consecutive integers. So let's study one of those factors.

joshuazucker 2022-05-26 20:52:31


What is the exponent of p in the prime factorization of lcm(1, 2, … , k)?

Andrew_Dou 2022-05-26 20:53:16


the largest power of p less than or equal to k

joshuazucker 2022-05-26 20:53:22


The exponent of p in the prime factorization of lcm(1, 2, … , k) is the largest integer e such that pe ≤ k .

joshuazucker 2022-05-26 20:53:34


Let's give this a name. Let f (k) be the largest integer e such that pe ≤ k .

joshuazucker 2022-05-26 20:53:49


Then how can we express the big product on the right side in terms of f ?

joshuazucker 2022-05-26 20:54:04


(Or, more specifically, the exponent of p in that product.)

Andrew_Dou 2022-05-26 20:55:46


n n n
f (⌊ ⌋)f (⌊ ⌋) … f (⌊ ⌋)
1 2 n

joshuazucker 2022-05-26 20:55:48


n
The first factor in that product has f (⌊ ⌋) for its exponent of p. That's f (n).
1

joshuazucker 2022-05-26 20:56:16


n
But then we want to multiply the next one which will be the same thing with in it.
2

joshuazucker 2022-05-26 20:56:44


But these f values are exponents of p, so when we multiply the factors on the left, what do we do to compute the exponent?

Captain_Z 2022-05-26 20:57:07


add

https://artofproblemsolving.com/class/3085-intermediate-numbertheory/transcript/48014 21/23
6/8/22, 9:59 AM 3085 Intermediate Number Theory

MathHayden 2022-05-26 20:57:07


add them?

joshuazucker 2022-05-26 20:57:17


We add, so the exponent of p in the prime factorization of the product of the lcm's is

n
n
∑ f (⌊ ⌋) .
i
i=1

joshuazucker 2022-05-26 20:57:29


So now we want to show

n
n n n
⌊ ⌋ + ⌊ ⌋ + … = ∑ f (⌊ ⌋) .
2
p p i
i=1

joshuazucker 2022-05-26 20:58:03


There's a nice counting argument from here, looking at the two sides as counting the same thing in two different ways.

joshuazucker 2022-05-26 20:58:47


Imagine the left sides as a bunch of towers of dots with height given by each term of the sum.

joshuazucker 2022-05-26 20:58:59


Then how does f (n) correspond to that bunch of towers?

joshuazucker 2022-05-26 20:59:57


By definition of f this is the largest power of p that is less than or equal to n.

joshuazucker 2022-05-26 21:01:27


n
The tallest tower has a height of ⌊ ⌋ which is not the same as this largest exponent of p that is still less than or equal to n.
p

joshuazucker 2022-05-26 21:01:32


How many nonzero terms are there on the left side?

jacknbailey 2022-05-26 21:02:08


f (n)

Andrew_Dou 2022-05-26 21:02:08


f (n) nonzero terms

lihao_david 2022-05-26 21:02:08


f(n)

joshuazucker 2022-05-26 21:02:15


Yeah! So f (n) counts exactly the "first floor" of all the towers.

joshuazucker 2022-05-26 21:02:38


n
In the same way, you can show that f (⌊ 2 ⌋) counts the second floor of all the towers that reach that high, and so on.

joshuazucker 2022-05-26 21:02:49


So we count the same set of towers, only slicing horizontally instead of vertically.

joshuazucker 2022-05-26 21:03:02


This is like the transpose of a partition, if you've taken Intermediate C&P.

joshuazucker 2022-05-26 21:03:05


But we're out of time! So

joshuazucker 2022-05-26 21:03:08


SUMMARY

joshuazucker 2022-05-26 21:03:10

https://artofproblemsolving.com/class/3085-intermediate-numbertheory/transcript/48014 22/23
6/8/22, 9:59 AM 3085 Intermediate Number Theory
The prime factorization of a number can be utilized in a number of different ways. It gives us a very simple way of enumerating all
the divisors of a number. It allows for a quick computation of the GCD and LCM of numbers.

joshuazucker 2022-05-26 21:03:12


We can also easily determine the prime factorization of the factorial of a number. This helps tremendously for dealing with not just
factorials but binomial coefficients. Binomial expansions are common in number theory all the way to problems far beyond the
level of any contest, so being able to deal with binomial coefficients in number theory problems is important.

joshuazucker 2022-05-26 21:03:33


Additionally, the power of the unique prime factorization theorem is not to be underestimated. It means that we are able to
determine any positive integer simply by specifying the exponents of its prime factorization. If we need to prove two numbers are
equal and it's easier to work in terms of their prime factorizations, this result is immensely valuable.

joshuazucker 2022-05-26 21:03:37


That's all for today. If you have any questions, please ask!

© 2022 Art of Problem Solving


About Us • Contact Us • Terms • Privacy

Copyright © 2022 Art of Problem Solving

https://artofproblemsolving.com/class/3085-intermediate-numbertheory/transcript/48014 23/23

You might also like