0% found this document useful (0 votes)
109 views41 pages

ACE The AMC 10 - 12!

The document outlines the qualification paths for the AIME, USAJMO, and USAMO exams, detailing the required scores and index calculations for each. It also provides definitions and rules related to prime and composite numbers, divisibility, LCM, and GCD, along with several example problems and solutions. The content is aimed at helping students prepare for AMC 10 and AMC 12 mathematics competitions.

Uploaded by

ananyakalia7
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)
109 views41 pages

ACE The AMC 10 - 12!

The document outlines the qualification paths for the AIME, USAJMO, and USAMO exams, detailing the required scores and index calculations for each. It also provides definitions and rules related to prime and composite numbers, divisibility, LCM, and GCD, along with several example problems and solutions. The content is aimed at helping students prepare for AMC 10 and AMC 12 mathematics competitions.

Uploaded by

ananyakalia7
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

Ritvik Rustagi (October 2023) ACE The AMC 10 and AMC 12

§1.10 Expected Paths for AIME and USA(J)MO


For those that don’t know, AIME stands for the American Invitational Mathemati-
cal Examination. This exam has 15 difficult questions to solve in 3 hours. To make
this exam, you must pass the cuto↵s for either the AMC 10 or AMC 12 exam.

USAJMO stands for the United States of America Junior Mathematical Olympiad
while USAMO stands for the United States of America Mathematical Olympiad.
To make USAJMO, you must do well on specifically the AMC 10 and AIME. To make
USAMO, you must do well on the AMC 12 and AIME.

For a guaranteed AIME qualification from the AMC 10, you will need above 110 out of
150. However, these days the cuto↵s are going down due to the drastically increasing
difficulty of the test. The cuto↵s lately have been barely above 100 (sometimes even less
than 100).

For the AMC 12, the required cuto↵ to make AIME is lower than what’s necessary
for AMC 10. A score that’s above 100 is almost certain to make it. Even a score in
the 90s can be enough; however, you should still aim higher just in case the cuto↵s are high.

Before talking about USA(J)MO, you should know what a score index is for this exam.
Your index is your AMC Score + 10 ⇥ Your AIME Score.

For example, if your AMC score is 120 while your AIME score is 10, then your in-
dex is 120 + 10 · 10 which is 220.

USAMO cuto↵s are significantly higher than USAJMO cuto↵s. You should aim for
a 240 index if you want to maximize your chances of qualifying for the USAMO.

For USAJMO, you should aim for a 215 index. An index of 215 should be signifi-
cantly above the cuto↵, as it has been in recent years. The increasing difficulty of both
the AMC 10 and AIME has caused USAJMO cuto↵s to decrease to slightly above 200 to
even less than 200.

8
2 Number Theory
§2.1 The Basics: Prime and Composite Numbers

Definition 2.1.1
A prime number isn’t divisible by any number other than 1 and itself. A composite
number is any integer that isn’t a prime number. It has more than 2 divisors.

It’s important to learn your divisibility rules.


Rule for 2: The units digit must be even.

Rule for 3: The sum of the digits must me divisible by 3.

Rule for 4: The last 2 digits must be divisible by 4.

Rule for 5: The last digit must be 0 or 5.

Rule for 8: The last 3 digits must be divisible by 8.

Rule for 9: The sum of the digits must be divisible by 9.

Rule for 11: The di↵erence between the alternating sums of the digits must be divisible
by 11

What if you want to know whether or not a number is divisible by 6 or 10 or 12? Then,
we simply write the prime factorization of those numbers and use the divisibility rules
for each of the prime factors separately. For example, 6 is 2 · 3, so we simply use both
the rules for divisibility by 2 and 3. For 10 we use the rules for 2 and 5 while for 12 we
use the rules for 3 and 4.

Problem 2.1.2 — The acute angles of a right triangle are a and b , where a > b
and both a and b are prime numbers. What is the least possible value of b?
(A) 2 (B) 3 (C) 5 (D) 7 (E) 11
Source: 2020 AMC 10

Solution: Since the sum of all of the angles in any triangle is 180 , we know that
a and b must sum to 90 since one of our angles is already 90 . Since we want to
minimize b, we’ll start testing our values for b starting from 1 and move up. Note: We
only need to test the odd numbers since an even number can never be prime other than 2 .

Trials for \B (\A = 90 \B)


1: Not a prime number
2: A = 90 2 = 88 (even)
3: A = 90 3 = 87 (divisible by 3)
5: A = 90 5 = 85 (divisible by 5)

9
Ritvik Rustagi (October 2023) ACE The AMC 10 and AMC 12

7: A = 90 7 = 83 (prime)
Thus, the answer is 7 (D)

Problem 2.1.3 — Let p, q, and r be prime numbers such that 2pqr +p+q +r = 2020.
Find pq + qr + pr.
Source: 2020 Purple Comet

Solution: In this problem, let’s assume that all of our prime numbers (p, q, and r are
odd since that’s always the case unless the prime number is 2.

We can see that 2pqr is always even. Also, if p, q, r are odd, then the sum of 2pqr+p+q +r
will be odd. However, that’s not possible because 2020 is even.

Thus, one of the prime numbers must be 2. Let’s assume that p is 2. Then our
equation becomes 4qr + q + r = 2018.

From Simon’s Favorite Factoring Trick (this will be covered in the Algebra chapter
later), we can factor the expression as
(2q + 12 )(2r + 12 ) = 2018 + 14

We can multiply both sides by 4 to get


(4q + 1)(4r + 1) = 8073
We prime factorize: 8073 = 33 · 13 · 23

Now we must find a pair of two numbers that multiplies to the prime factorization
above. We will equate each of the numbers to 4q + 1 and 4r + 1 to see if q and r are
prime numbers.

We can test the pairs one at a time, and the one that works is 32 · 13 and 3 · 23. If
we equate 32 ·13 (117) to 4q+1 and 3·23 (69) to 4r+1, then we get that q = 29 and r = 17.

Since we know that p = 2, q = 29, r = 17, we can plug this into pq + qr + pr to


get that the answer is 585.

§2.2 Multiples, Divisors, Prime Factorization

Definition 2.2.1
The LCM (Least Common Multiple) of a set of numbers is the smallest integer that
is a multiple of the entire set. Often, you can find that LCM by prime factorizing
all of the numbers of that set.

10
Ritvik Rustagi (October 2023) ACE The AMC 10 and AMC 12

Theorem 2.2.2

The theorem above is used to find the LCM of two numbers. If you prime factorize
any set of numbers, then you take the largest exponent for ALL of the prime numbers.
If you don’t understand the theorem above, then do not panic since examples will
be presented soon.

Definition 2.2.3
The GCD (Greatest Common Denominator) of a set of numbers is the largest integer
that can divide the entire set. Often, you can find that GCD by prime factorizing
all of the numbers of that set.

Theorem 2.2.4

The image above is the best viewpoint to learn GCD from. If you prime factorize
any set of numbers, then you take the SMALLEST exponent for ALL of the prime
numbers. For example, if the two numbers that I am finding the GCD for are
divisible by 26 and 28 respectively, then 26 will be used to find the GCD since 6 is
smaller than 8. A simple example will be presented below.

Example 2.2.5
What is the GCD of 15 and 24?

Solution: Prime factorizing gives that 15 is 3 · 5 and 24 is 23 · 3.


We will now account for all of the unique prime divisors for both of those numbers even if
it only divides one of the numbers. Our unique prime divisors are 2, 3, and 5. Since the
lowest exponent of the divisor 2 is 0 (since it doesn’t divide 15), our GCD will include 20 .
Similarly, the lowest exponent is simply 1 for the prime factor 3. For the prime factor 5,
even though it divides 15, the exponent of 5 in the prime factorization of 24 is 0 (which
is smaller than 1).
Thus, our GCD is 20 · 31 · 50 = 3.

11
Ritvik Rustagi (October 2023) ACE The AMC 10 and AMC 12

Key Takeaway: Remember that even if a prime factor only divides one of the
numbers from that set, the minimum exponent will still be 0 because it doesn’t divide all.
Similar for the LCM, you take the maximum of the exponents for all of the unique
prime divisors.

Example 2.2.6
What is the LCM of 18, 22, and 24.

Solution: We will write out the prime factorization of all of the numbers.
18 = 21 · 32
22 = 21 · 11
24 = 23 · 3
Since the maximum exponents for 2, 3, and 11 are 3, 2, and 1 respectively, the LCM is
23 · 32 · 111 = 792
Note: Just remember that the LCM is the maximum of all the exponents of each
unique divisor while the GCD is the minimum of all exponents of each unique divisor.

Problem 2.2.7 — The least common multiple of a positive integer n and 18 is 180,
and the greatest common divisor of n and 45 is 15. What is the sum of the digits of
n?
(A) 3 (B) 6 (C) 8 (D) 9 (E) 12
Source: 2022 AMC

Solution: Since the LCM involves prime factorizing the set of numbers and taking the
largest exponent of all unique prime divisors (the union of all the prime divisors), we will
do that for n and 18. We will similarly do that for 45.
18 = 2 · 32
180 = 22 · 32 · 5
45 = 32 · 5
15 = 3 · 5
Using our first 2 prime factorizations, we know that the 22 must divide n since 22 divides
the LCM (180) but it doesn’t divide 18 (We want the maximum exponent for the prime
factor to divide the LCM). We can’t use the prime divisor of 3 to make any conclusions
since 32 divides both the LCM and 18. This means that the exponent of 3 must be
between 0 and 2 for n because the maximum condition for the prime divisor has already
been satisfied.

Now we will work with 45 and 15. Clearly 5 must divide n since it divides the GCD of
45 and n which is 15. We also know that 3 must divide n to make the GCD 15 (if n has
no factor of 3, then the GCD won’t be divisible by 3).

Thus, n is 22 · 3 · 5 which evaluates to 60. Our answer is 6 + 0 which is 6 (B).

12
Ritvik Rustagi (October 2023) ACE The AMC 10 and AMC 12

Problem 2.2.8 — How many positive integers n are there such that n is a multiple
of 5, and the least common multiple of 5! and n equals 5 times the greatest common
divisor of 10! and n?
(A) 12 (B) 24 (C) 36 (D) 48 (E) 72
Source: 2021 AMC

Solution: The given equation is lcm(5!, n) = 5 · gcd(10!, n)


We can prime factorize 5! to get 23 · 3 · 5.
We can prime factorize 10! to get 28 · 34 · 52 · 7.

Note: The numbers above were prime factorized using legendre’s theorem which you
will be learning soon. Don’t worry about that step right now.

The LCM involves taking the largest exponent of each unique prime divisor while the
gcd is the smallest exponent of each unique prime divisor. We will focus on each unique
prime factor.

Starting with 2: Since the LCM involves the largest exponent of any unique prime
divisor, we know that the LCM must be divisible by at least 23 because of 5!.
Looking at 2 in the GCD, the exponent of 2 must be less than or equal to 8. Thus, n can
take all values from 3 to 8.

For 3, the LCM will have at least an exponent of 1 for 3. The GCD relation tells
us that the maximum exponent for 3 is 4. Thus, the prime factor 3 of n can have any
exponent from 1 to 4.

For 5, we have to use the given condition that 5 divides n. Let’s assume that n = 5a · x.
We can know write out an equation for the exponent of 5: max(1, a) = 1+min(2, a)
Testing values for a gives that the only one that works is 3 which means that n must be
divisible by 53 .

For 7, we can write out an equation for the exponents. Let’s assume that 7b divides n.
Then, we get max(0, b) = min(1, b). Testing values shows that both 0 and 1 work. This
means that the possible exponents for the prime factor 7 are 0 and 1.

Since we have 6 possible exponents for 2, 4 for 3, 1 for 5, and 2 for 7, our answer
is all of those numbers multiplied (6 · 4 · 1 · 2) which gives 48 (D).

Problem 2.2.9 — Find the number of 7-tuples of positive integers (a, b, c, d, e, f, g)


that satisfy the following system of equations:

abc = 70

cde = 71
ef g = 72.

Source: 2019 AIME

Solution: Since c is common in the first and second equation, and e is common in the

13
Ritvik Rustagi (October 2023) ACE The AMC 10 and AMC 12

second and third equation, we know that c must divide 71 and 70 while e must divide 71
and 72.

Working with c, there clearly is no divisor that divides both 71 and 70 other than
1. Thus, c = 1. Similarly, there is no divisor that divides both 71 and 72 other than 1, so
e = 1.
Our 3 equations now become

ab = 70
d = 71
f g = 72

Since we already know our values c, d, e which are 1, 71, 1 respectively, we just have to
work with the equations ab = 70 and f g = 72 to find the number of possible values for
these 4 variables.

Since 70 = 2 · 5 · 7, there are 8 factors in this number (if you don’t understand why there
are 8 factors in the number, then don’t panic. The theorem for finding that out will be
explained later in the book). We can simply pair up the factors that multiply to 70 such
as for (a, b) some possible values are (1, 70), (70, 1), (2, 35), and (35, 2). Clearly there are
8 ways to choose our values of a and b.

Doing this for f g = 72 first gives that 72 = 23 · 32 . There are (3 + 1)(2 + 1) = 12


factors which means that it is the number of ways to choose values for f and g.

Our total number of ways to choose the variables is 8 · 12 which is 96

Problem 2.2.10 — Let a1 , a2 , a3 , a4 , a5 be positive integers such that a1 , a2 , a3 and


a3 , a4 , a5 are both geometric sequences and a1 , a3 , a5 is an arithmetic sequence. If
a3 = 1575, find all possible values of |a4 a2|.
Source: 2017 CMIMC

Solution: In this problem, we will assume that for the geometric sequence a1 , a2 , a3 ,
the ratio is r. We work backwards to write the terms a1 and a2 in terms of a3 (a3 is
given as 1575) and r.

1575
a1 = r2

1575
a2 = r

Let’s assume the ratio is s for the geometric sequence a3 , a4 , a5 which gives

a4 = 1575s
a5 = 1575s2

Since a1 , a3 , a5 forms an arithmetic sequence, we know that a5 a3 = a3 a1 (since the


di↵erence between consecutive elements must be the same) which becomes a1 + a5 = 2a3 .
We substitute our values to get

14
Ritvik Rustagi (October 2023) ACE The AMC 10 and AMC 12

1575
r2
+ 1575s2 = 2 · 1575
Dividing the equation by 1575 gives

1
r2
+ s2 = 2

Since we know that both r and r2 divide 1575 because all the terms are an integer, we
can prime factorize 1575 to get 32 · 52 · 7.

From here, the possible values of r that makes r and r2 divide 1575 are 1, 3, 5, and 15.
We will test all values of r, and plug them into r12 + s2 = 2. Then, we’ll find the value of
s using that equation and see if 1575s and 1575s2 become integers.

Testing all our values of r gives that the only values that will work are 1 and 5 which
respectively gives 0 and 75 for s.

Now we will compute the value of a4 a2 , and it is 1575s 1575 r . We plug in our
found values of r, s to give that the possible values are 0 and 1890.

Problem 2.2.11 — A positive integer n has 4 positive divisors such that the sum
of its divisors is (n) = 2112. Given that the number of positive integers less than
and relative prime to n is (n) = 1932, find the sum of the proper divisors of n.
Source: 2021 SMT

Solution: Since we know that n has 4 divisors, the prime factorization must be in the
form p · q or p3 .

Case 1: n = p · q
The sum of the divisors in this case is (1 + p)(1 + q) = 2112
The number of numbers relatively prime to n can be found using Euler’s Totient Function,
and we get p · q · p p 1 · q q 1
We now simplify it to (p 1)(q 1) = 1932

We work with the equation (1 + p)(1 + q) = 2112 and prime factorize 2112 as 26 · 3 · 11.

We will now make pairs for 1 + p and 1 + q that multiply to 2112, and we get one
pair to work as 48 and 44. This gives that one prime number will be 47 while the other
will be 43.
We test this by plugging it into (p 1)(q 1) = 1932, and we see that it works. Thus,
the sum of the proper divisors (all divisors except the number itself) is 1 + 43 + 47 = 91.

You can test out the second case (n = p3 ) for the problem above. You’ll simply
find out there’s no possible value of n for it.

§2.3 Number of Factors and Sum of all Factors


To find the number of factors, we must prime factorize that number. Then, we add 1 to
all of the exponents and multiply all of those numbers with each other.
For example, for the number 18, the prime factorization is 32 · 21 . Now we simply add 1
to all of the exponents of the prime divisors. The exponents are 2 and 1. When we add 1

15
Ritvik Rustagi (October 2023) ACE The AMC 10 and AMC 12

to all, we get 3 and 2. We multiply those two numbers to get 6 factors.

We’ll use another example of 180. Since 180 is 22 · 32 · 51 , the exponents of all 3
unique prime divisors are 2, 2, and 1. We add 1 to each to get 3, 3, 2. Multiplying the 3
numbers gives us 18 factors.

Theorem 2.3.1
The sum of the divisors is represented as 1 (n). 1 (n) = (1 + p1 + p21 + · · · pe11 )(1 +
p2 + p22 + · · · + pe22 ) · · · (1 + pk + p2k + · · · + pekk ).

The above formula tells us how to calculate the sum of all factors of any number. We
will work with each individual prime divisor at a time. We will add 1 and all powers of
that specific prime divisor till we hit the maximum exponent for that divisor that divides
n. Then, we just multiply those individual sums.

Example 2.3.2
What is the sum of the factors of 140?

Solution: To find the sum of the factors for any number, we must first prime
factorize it.
140 = 22 · 51 · 71
We compute (1 + 21 + 22 )(1 + 51 )(1 + 71 ) which results in the answer being 336.

What if you want to find how many powers of a specific prime number divide a factorial
(n!)? What if you want to prime factorize a factorial number?

Theorem 2.3.3
Legendre’s Theorem allows us to find the largest exponent of any prime number
that divides a factorial.

P n
ep (n!) = 1i=1
pi

The formula above works when p is a prime number and ep (n!) is the largest exponent of
p found when you prime factorize n!. Read the example below to get a feel for how to
use this formula if you’re still struggling.

We can find the highest power of a prime number that divides n factorial by just using n
and dividing it by p once. We also have to round down each time (floor function). Then,
we divide n by p2 and round down. We continue to increase the exponent of p by 1 un-
til we round down and get 0 which is when we can stop and add up all the values we found.

16
Ritvik Rustagi (October 2023) ACE The AMC 10 and AMC 12

Example 2.3.4
Find the greatest power of 5 that⌫divides 156!.
P 156
Solution: ep (156!) = 1 i=1
5i ⌫ ⌫
156 156
All we have to do is calculate the summation on the right now. + +
⌫ ⌫ 5 25
156 156
+
125 625
Note: Floor function just means we have to round down.
Our sum simply is 31 + 6 + 1 + 0 which equals to 38. Thus, 538 can divide 156!

What if we want to find the greatest power of a non-prime number that can
divide a factorial?
To find the greatest power of a non-prime number that can divide a factorial, we simply
prime factorize that non-prime number. Then, we find the largest exponent for each
individual prime factor that can divide the factorial. After that, we will use the minimum
exponent out of those. However, there’s a catch to this. Non prime numbers can also
include 12 which is divisible by more than 1 power of 2. That is why you can’t blindly
apply this technique. There will be an example that will involve non prime numbers with
at least one prime factor that has an exponent larger than 1 in the problems section.

Example 2.3.5
Find the largest exponent of 14 that divides 180!.

Solution: We first prime factorize 14 to simply get 2 · 7. Now, we individually find


the largest exponent for 2 and 7 separately that can divide 180!. We will use the
smallest one since that’s the ”limiting factor” (for people that have done chemistry
and know limiting reactants should make sense of this with ease).
⌫ ⌫ ⌫ ⌫ ⌫ ⌫ ⌫ ⌫
180 180 180 180 180 180 180 180
e2 (180!) = + + + + + + + .
2 4 8 16 32 64 128 256
This sum equals to 90 + 45 + 22 + 11 + 5 + 2 + 1 + 0 = 176
⌫ ⌫ ⌫
180 180 180
e7 (180!) = + + .
7 49 343
This sum equals to 25+3+0 = 28.

Thus, the largest exponent of 2 that can divide 180! is 176 while the largest for 7 is
28. The exponent for 2 and 7 must be the same for us since we’re trying to find the
largest exponent of 14. If we assume that largest exponent is n then 14n = 2n · 7n .
Thus, to maximize our value of n we must choose 28 since any higher value won’t
divide 180! since 7 restricts it to be below 28.
Final Answer: 28

17
Ritvik Rustagi (October 2023) ACE The AMC 10 and AMC 12

Theorem 2.3.6
We also know that the product of the divisors of any integer n is
d(n)
n 2

d(n) represents the number of divisors of the number n.

Problem 2.3.7 — Compute the sum of all positive integers whose positive divisors
sum to 186.
Source: 2020 PUMAC Number Theory

Solution: Let’s assume that the prime factorization of the number as pe11 · pe22 · pe33 ...

The sum of the divisors are (1 + p1 + p21 ... + pe11 )(1 + p2 + p22 ... + pe22 )(1 + p3 + p23 ... + pe33 )...

186 = 2 · 3 · 31
Now we need to write out pairs that multiply to 186 to find the prime factorization.
2 won’t work because (1 + p1 + p21 ... + pe11 ) can’t equal 2 since it means p1 will have to be
1 which isn’t a prime number.

Thus, the pairs that we need to test are (6, 31) and (3, 62).

6=1+5
31 = 1 + 2 + 4 + 8 + 16
For this combination, the product is 5 · 24 which is 80.

3=1+2
62 = 1 + 61
In this case, our number that’s sum of divisors is 186 is 2 · 61 which is 122.

Thus, we add up 80 + 122 to get 202 as our final answer.

Problem 2.3.8 — For some positive integer n, the number 110n3 has 110 positive
integer divisors, including 1 and the number 110n3 . How many positive integer
divisors does the number 81n4 have?
(A) 110 (B) 191 (C) 261 (D) 325 (E) 425
Source: 2016 AMC

Solution: 110n3 equals to 2 · 5 · 11 · n3 .


We know that this number has 110 divisors. We also know that there are a minimum of
3 unique divisors (since we already know that 2, 5, and 11 are divisors).

Let’s prime factorize 110 to get 2 · 5 · 11. We know from our formula that to find
the number of divisors that we simply add 1 to each exponent of the unique prime
divisors.

18
Ritvik Rustagi (October 2023) ACE The AMC 10 and AMC 12

Thus, now we work REVERSE and our exponents are 1, 4, and 10 (after subtract-
ing 1 from 2, 5, and 11). Thus, we can assume that n3 is 53 · 119 . This assumption stems
from the fact that 110n3 prime factorized should have exponents of 1, 4, 10 for it’s unique
prime factors.

We take the cube root for n3 to get that n equals to 5 · 113 . Now we find the number
of divisors of 81n4 . We know this equals to 34 · 54 · 1112 . Now we just add 1 to each
exponent to get 5, 5, and 13. We multiply the 3 numbers to get 325 (D).

Problem 2.3.9 — The following number is the product of the divisors of n.


26 · 33
What is n?
Source: 2015 CHMMC

Solution: In this problem, we can apply our formula that the product of the divisors of
d(n)
any number n is n 2 where d(n) represents the number of divisors. We can equate this
to our value of 26 · 33 .
d(n)
n 2 = 2 6 · 33
Squaring both sides gives

nd(n) = 212 · 36

Clearly, the only prime factors of n must be 2 and 3 (if it’s something else, then it
won’t equate to the right side as it only has prime factors 2 and 3).

Let’s assume n = 2a · 3b . d(n) for this is simply (a + 1)(b + 1)

(2a · 3b )(a+1)(b+1) = 212 · 36

We can multiply the exponent of 2 which is currently a to (a + 1)(b + 1) and simi-


larly do the same for the exponent b of 3.

This gives 2a(a+1)(b+1) = 212


This gives 3b(a+1)(b+1) = 36

We can equate the exponents for both equations we wrote above to get
a(a + 1)(b + 1) = 12
b(a + 1)(b + 1) = 6

a
Dividing both of the equations above gives b = 2 which means that a = 2b

We can plug this into b(a + 1)(b + 1) = 6 to get that b(2b + 1)(b + 1) = 6 and b
obviously has to be 1. This means that a is 2.

Since we know our values of a and b, we know that n is 22 · 31 which is 12

19
Ritvik Rustagi (October 2023) ACE The AMC 10 and AMC 12

Problem 2.3.10 — How many positive integer divisors of 20042004 are divisible by
exactly 2004 positive integers?
Source: 2004 AIME

Solution: We first write out the prime factorization of both 20042004 and 2004.
Both respectively are 24008 · 32004 · 1672004 and 22 · 3 · 167.

Out of all of the divisors of 20042004 , we can have a maximum of 3 unique prime
factors (2, 3, 167) as seen in our prime factorization.

Let’s assume our divisor of 20042004 is 2x · 3y · 167z . Then, the number of divisors
that it has is (x + 1)(y + 1)(z + 1). We equate this to 2004.

(x + 1)(y + 1)(z + 1) = 22 · 3 · 167

Now we can distribute each prime factor to the numbers x + 1, y + 1, and z + 1.


We can have two cases: one in which both factors of 2 divide one of the numbers and for
the other 2 will divide two separate numbers.
If all factors of 2 divide only one number, then there are 3 cases for that (either x + 1,
y +1, or z +1). If one factor of 2 divides 2 of the numbers, then there are 32 cases for that
which is 3. The total possible number of cases are 3+3 which is 6 (for the prime factor of 2

Now we split the factor of 3. There are simply 3 places for it to go: either x + 1,
y + 1, or z + 1. The same thing applies to 167.

Our answer is 6 · 3 · 3 which is 54.

Problem 2.3.11 — Let n = 231 319 . How many positive integer divisors of n2 are
less than n but do not divide n?
Solution: 1995 AIME

Solution: n2 is simply 262 · 338 .


We notice that each factor pair of n2 will have one factor less than n and one more than
n. To see this, you can observe some examples and experiment with a few factor pairs
that multiply to n2 .

However, there will be one divisor that won’t have a unique pair which is n since
it is paired to itself to get n2 .

Thus, to find the number of divisors that are less than n, we first find the number
of factors in n2 : (62+1)(38+1). Then, we subtract by 1 to get rid of n from the factors.
After that, we divide by 2 (since only half will be less than n) to get 1228. However, some
of those factors divide n (which is something we don’t want due to the given conditions).
Thus, we now need to subtract the number of factors that are less than n and divide n.

Clearly, all factors of n are less than n except for n itself. Thus, we find the num-
ber of divisors of n and subtract that by 1. Then, we’ll subtract that value from 1228.
The number of factors in n is (31 + 1)(19 + 1) which is 640. Subtracting 1 from 640 gives
us 639. Then, we subtract that from 1228 to get 1228-639 = 589

20
Ritvik Rustagi (October 2023) ACE The AMC 10 and AMC 12

§2.4 Factorials and Palindromes


Factorials and palindromes both show up often on the AMCs and AIME. It’s important
to know problem solving strategies for these types of problems. Often, factorial problems
involve legendre’s theorem that we saw in this book already. The best way to solve
factorial/palindrome problems is to simply practice as there isn’t much theory to go with
it.

Definition 2.4.1
A palindrome is a number that reads the same if you read it left to right or from
right to left. For example, 121, 1441, 3883, 39493 are all palindromes as they are
the same numbers whether you read it from left to right or right to left.

Often, to solve problems related to palindromes, you can write the palindrome out
in its expanded form. If you’re not given the palindrome, then you can use variables
to represent the digits. Then, you can pair up the digits that are the same to write an
expression.
For example, if you want to represent a palindrome with 3 digits, you can write it as aba
where a and b are integers. aba is equivalent to a · 100 + b · 10 + a · 1 which is equivalent
to 101a + 10b.

Problem 2.4.2 — A palindrome between 1000 and 10, 000 is chosen at random.
What is the probability that it is divisible by 7?
1 1 1 1 1
(A) (B) (C) (D) (E)
10 9 7 6 5
Source: 2010 AMC

Solution: Our palindrome clearly has 4 digits. That means we can represent it as abba.
We can rewrite this as a · 103 + b · 102 + b · 101 + a · 100 . This is equivalent to 1001a + 110b.

From here, we will now investigate with the numbers a and b to find the probabil-
ity that the number is divisible by 7. We notice that 1001a is always divisible by 7
because 1001 is. Thus, we only need to work with 110b which is equivalent to 5b modulo
7. 5b will be divisible by 7 when b is 0 or 7. We have 10 possible digits for b from 0 to 9.
2
There are 2 possibilities that work which means the probability is 10 = 15 (E).

Problem 2.4.3 — Many states use a sequence of three letters followed by a sequence
of three digits as their standard license-plate pattern. Given that each three-letter
three-digit arrangement is equally likely, the probability that such a license plate
will contain at least one palindrome (a three-letter arrangement or a three-digit
m
arrangement that reads the same left-to-right as it does right-to-left) is , where m
n
and n are relatively prime positive integers. Find m + n.
Source: 2002 AIME

Solution: We can separately solve for the chance of having palindromic digits or
letters. For a combination to be palindromic for digits, we have 102 palindromes. We
know this is true because a 3 digit palindrome is equivalent to aba where a and b are
digits. In this case, whatever we choose for the first digit forces the third digit to be
that since it’s a palindrome. The number of possible numbers is simply 103 . Thus, the

21
Ritvik Rustagi (October 2023) ACE The AMC 10 and AMC 12

102 1
probability is 3
which reduces to .
10 10

When we solve for the palindromic letters, then there are 262 palindromes and 263
262 1
possible strings. The probability for this case is 3 which equals to .
26 26

Before we simply add both of these probabilities, by the principle of inclusion exclusion
theorem (PIE), we must subtract the chance of both occurring at once. For those that
don’t know this theorem just remember that it will be covered eventually so don’t panic.

1 1 1 1
The chance for both occurring at once is · which is . Now we compute:
26 19 260 26
1 1 7
+ to get . We add the numerator and denominator to get 7 + 52 = 59.
10 260 52

Problem 2.4.4 — A palindrome is a nonnegative integer number that reads the


same forwards and backwards when written in base 10 with no leading zeros. A
6-digit palindrome n is chosen uniformly at random. What is the probability that
n
11 is also a palindrome?
8 33 7 9
(A) 25 (B) 100 (C) 20 (D) 25 (E) 11
30
Source: 2013 AMC

Solution: To solve this problem, it’s best to work backwards. We will only get a 6
digit palindrome if we multiply a 4 or 5 digit palindrome by 11.

Case 1: We get a 4 digit palindrome after dividing the 6-digit palindrome by 11


This number will be in the form of ABBA. A and B represent integers; B can be anything
from 0 to 9 while A can be anything from 1 to 9. When we multiply this by 11, we get
the result shown below.

The digits from left to right are A, A + B, 2B, A + B, A if there are no carryovers.

However, we want to get a 6 digit palindrome when we multiply by 11. Thus, that is
only possible when A is 9 and we carry a 1 from summing A + B. This means the first
digit will be 1, and the last digit which is A will simply be 9. However, since the first
and last digit are not equal, this case is not possible (a palindrome’s first and last digits
must be equal).

22
Ritvik Rustagi (October 2023) ACE The AMC 10 and AMC 12

Case 2 (We get a 5 digit palindrome after dividing the 6 digit palindrome by 11)
A 5 digit palindrome will be in the form ABCBA. Multiply this by 11 to get what is
shown below

If there are no carryovers, then the digits from right to left are A, A + B, B + C, B +
C, A + B, A. We can see immediately that this is a 6 digit number. The most important
thing to note is that we don’t want any carryovers or else it won’t be a palindrome
anymore. You can plug in some numbers to notice this.

We will do some casework now. The digit A must be at least 1.

The image above shows an example of casework for the digit A being 1. The number of
possible cases for it is simply the sum of all integers from 2 to 10 inclusive which is 54.

We can continue this pattern all the way to A = 9 and see that the amount of possibilities
are 54 + 52 + 49 + 45 + 40 + 34 + 27 + 19 + 10 = 330. The total number of cases are
simply the amount of 5 digit palindromes representing ABCBA. There are 9 choices for
digit A (1 9) and 10 for each of B and C (0 9). The total is 9 · 10 · 10 which is 900.
330 11
The final answer is which reduces to .
900 30

23
Ritvik Rustagi (October 2023) ACE The AMC 10 and AMC 12

Problem 2.4.5 — Find the probability that a randomly selected divisor of 20! is a
multiple of 2000.
Source: 2020 SMT

Solution: We will use legendre’s theorem to first prime factorize 20!. We do this for the
prime numbers that are less than 20 which are 2, 3, 5, 7, 11, 13, 17, and 19.

20! = 218 · 38 · 54 · 72 · 11 · 13 · 17 · 19

Now we also prime factorize 2000 which gives 24 · 53

Any multiple of 2000 must have an exponent of at least 4 for 2 and at least 3 for
5.
We must find the number of divisors in 20! that satisfy this. This means that the exponent
of 2 can be anything from 4 to 18 (15 choices out of 19), and the exponent of 5 can be
anything from 3 to 4 (2 choices out of 5).

15 2 6
We can write this probability as 19 · 5 to get 19

Problem 2.4.6 — Given that


((3!)!)!
3! = k · n!
where k and n are positive integers and n is as large as possible, find k + n.
Source: 2003 AIME

Solution: For this problem, we first compute the left-hand side. 3! is 6 and 6! is 720
and now we’re left with 720!
3! .

Since we want to maximize n, we need to find the largest factorial that can divide
the expression 720! 720!
3! . We can simply reduce 3! to
720⇥719!
3! which gives us 120 · 719!. This
is the format of the answer we want, and we can’t have a higher number than 719 for n.
Thus, the answer is 719 + 120 which is 839.

Problem 2.4.7 — How many positive integers less than or equal to 240 can be
expressed as a sum of distinct factorials? Consider 0! and 1! to be distinct.
Source: 2020 HMMT

Solution: The factorials that are less than 240 are 0!, 1!, 2!, 3!, 4!, and 5!. If we try to
add up 0!, 1! or 2!, then we’ll notice that some of the sums repeat such as 0! + 1! being
equivalent to 2!. However, no such problem occurs with 3!, 4! or 5!.

Thus, any of the 3 factorials can be present or not in our sum which means there
are 2 cases for each (present or not). 2 · 2 · 2 is simply 8.

Now we will deal with 0!, 1!, and 2!. The 3 numbers are equivalent to 1, 1, and 2.
We can either exclude all which gives us 0 or add combinations of them to get all numbers
from 1 to 4 inclusive. Thus, there are 5 possible values. We multiply this to 8 to get 40.

However, we must subtract the case in which 3!, 4!, and 5! are not present since it

24
Ritvik Rustagi (October 2023) ACE The AMC 10 and AMC 12

allows us to get the number 0 which isn’t positive. Thus, the answer is 40 1 which is
39.

Problem 2.4.8 — Let N be the number of consecutive 0’s at the right end of the
decimal representation of the product 1!2!3!4! · · · 99!100!. Find the remainder when
N is divided by 1000.
Source: 2006 AIME

Solution: To find the number of consecutive 0s, we need to know how many times 10
divides the number. From Legendre’s theorem, we remember that we can simply split
an integer we want to find the highest power for into its prime factors. In this case,
we split 10 to 2 and 5. Clearly there will be much more 2s than 5s. Thus, we just
solve for the number of 5s. We will go through and divide everything by 5 and round down.
P jnk
e5 (n!) = 100n=1
5
We can solve the above expression by noticing a pattern. The first 4 numbers from 1 to
4 simply give us 0. However, when n = 5 to 9 we get 1. When n is a value between 10
and 14 inclusive, we get 2 and so on.

There are 5 repeats for the same values from 1 through 19. For the value n=100 ,
we get 20 in the summation. Thus, we simply sum 1 through 19 using the sum of the
19 · 20
first n terms to get which is 190. Multiplying by 5 gives 950. Now, we add the 20
2
from n = 100 to get 970.

However, there are more factors of 5. Whenever 25 divides any of the factorials, we
get another factor 5. Thus, we will repeat this process but with 25 instead of 5.
P100 j n k
e25 (n!) = n=1
25
We can find a pattern again. Whenever n is between 0 and 24 inclusive, we get 0.
When n is between 25 and 49, we get 1 factor of 25 for each. When n is between
50 and 74 we get 2 factor of 25 for each. When n is between 75 and 99 we get 3
factor of 25 for each. When n is 100, we get 4 factors of 25. We compute this as
(24 · 0) + (25 · 1) + (25 · 2) + (25 · 3) + (1 · 4) which is 154. We add 970 and 154 to get
1124 0s in this number. Dividing this by 1000 gives us 124 as the final answer.

§2.5 Numbers in Di↵erent Bases

Problem 2.5.1 — Let n be a positive integer and d be a digit such that the value
of the numeral 32d in base n equals 263, and the value of the numeral 324 in base n
equals the value of the numeral 11d1 in base six. What is n + d?

(A) 10 (B) 11 (C) 13 (D) 15 (E) 16


Source: 2021 AMC

Solution: To solve this problem, we can rewrite the numbers in di↵erent bases as an
algebraic expression. We convert it to base 10. 32dn in base 10 is 3n2 + 2n + d and this

25
Ritvik Rustagi (October 2023) ACE The AMC 10 and AMC 12

equals to 263. We now convert 324n to base 10 and equate it to 11d16 in base 10 which
is 253 + 6d. Our two equations are listed below.

1. 3n2 + 2n + d = 263
2. 3n2 + 2n + 4 = 253 + 6d

From here, we can rewrite the first equation as 3n2 + 2n = 263 d. Then, we can
substitute that into the second one to get
253 + 6d + 4=253 6d
We solve for d to get that d = 2. Then, we can plug that into the first equation and solve
the quadratic to get n = 9. Thus, the answer is simply 2 + 9 which is 11 (B).

Our next problem again shows an example of how many of these problems are sim-
ply about converting the numbers in di↵erent bases to base 10.

Problem 2.5.2 — The number Nb is the number such that when written in base b,
it is 123. What is the smallest b such that Nb is a cube of a positive integer?
Source: 2019 SMT

Solution: In this problem, we will convert 123b to base 10.


We get 1 · b2 + 2 · b + 3 = b2 + 2b + 3.
The base must be at least 4 because the largest digit in that number is 3.

We plug in 4 for b to test it which gives 27. Since 27 is the cube of 3, our base b
is 4.

Problem 2.5.3 — A rational number written in base eight is ab.cd, where all digits
are nonzero. The same number in base twelve is bb.ba. Find the base-ten number
abc.
Source: 2017 AIME

Solution: We notice that for the two numbers to be equal, the integer parts must be
actual to each other while the fractional parts for both numbers are also equal to each
other. ab8 must be equal to bb12 . Similarly, the fractional parts in the di↵erent bases
must also equate to each other. Working with the first and second digit to the left of the
decimal point, we get

81 · a + 80 · b = 121 · b + 120 · b
This is equivalent to 8a + b = 12b + b which simplifies to 2a = 3b. From here, we will do
some casework to find the possible values of a and b. a and b both must be strictly less
than 8 because all the digits of a number in base b must be less than b (ab is a number
in base 8 given in the problem statement). Thus, the possible sets for (a, b) are (3, 2)
and (6, 4). We will work with both cases.

Case 1: (a, b) = (3, 2)


We just need to check if the fractional parts equate since we already found the solutions
that make the non fractional parts equate. The fractional part for ab.cd from base 8 to
10 is 8c + 64
d
.
We equate that to the fractional part of base 12 converted to get the final equation of

26
Ritvik Rustagi (October 2023) ACE The AMC 10 and AMC 12

c d b a
8 + 64 = 12 + 144 . We now plug in 2 for b and 3 for a. Simplifying gives that 8c + d = 12.

From here the only possible solution set for(c, d) = (1, 4). Thus, our value of abc
is 321.
Although clearly there is only one possible answer for this problem which we found as
321, lets see if there is something possible for the other solution set.

Case 2: (a, b) = (6, 4)

We just need to check the fractional parts. We can convert both fractional parts to get
the equation
c d b a
8 + 64 = 12 + 144 . Plugging in 6 for a and 4 for b and simplifying gives us
c + 8d = 24. However, there are no solutions for this since c and d must be nonzero. This
means d can either be 1 or 2. The value of c will be 16 and 8 respectively for both cases,
and that isn’t possible since c is part of a base 8 number which means the digits must be
less than or equal to 7.
Thus, our final answer is 321.

Problem 2.5.4 — Hexadecimal (base-16) numbers are written using numeric digits
0 through 9 as well as the letters A through F to represent 10 through 15. Among the
first 1000 positive integers, there are n whose hexadecimal representation contains
only numeric digits. What is the sum of the digits of n?
(A) 17 (B) 18 (C) 19 (D) 20 (E) 21
Source: 2015 AMC

Solution: We will first convert 1000 to base 16. We get 3 · 162 + 14 · 161 + 8.

14 in base 16 is equivalent to E. Since we want to find the number of integers who


only have numeric digits in hexadecimal base (meaning no 10 through 15 for the digit),
we have 4 possible values for the first digit from 0 3. Similarly, there are 10 for the
remaining 2 digits since they can take anything from 0 through 9 and still be less than
1000. Thus, the number of possibilities are 4 · 10 · 10 which is 400. However, we only
want positive integers so we need to subtract one case when all the digits are 0. Thus,
the final answer is 399 and the sum of the digits are 21 (E).

Note: If you’re asked to add/subtract/divide/multiply two numbers in di↵erent bases,


you can simply convert all the numbers to base 10.

Problem 2.5.5 — A positive integer N has base-eleven representation a b c and


base-eight representation 1 b c a, where a, b, and c represent (not necessarily distinct)
digits. Find the least such N expressed in base ten.
Source: 2020 AIME

Solution: We can convert the two integers that are in base 11 and base 8 to base 10.
Then, we can equate both of them since they both equal to N .

abc from base 11 to 10 is simply 112 · a + 11 · b + c = 121a + 11b + c

1bca from base 8 to 10 is 83 · 1 + 82 · b + 8 · c + a = 512 + 64b + 8c + a.

27
Ritvik Rustagi (October 2023) ACE The AMC 10 and AMC 12

Now we know that 121a + 11b + c = 512 + 64b + 8c + a

Rearranging the terms gives 120a = 512 + 53b + 7c

Now we can use the idea that for any number in base b, all of its digits must be
between 0 and b 1 inclusive. Since a, b, c are part of two numbers that are in base 8
and 11, the 3 variables must be between 0 and 7 inclusive.

Since we want the left side (which is 120a) to equate to the right side, the value
of a cannot be 4 (because 512 is present on the right side). It must be at least 5. Let’s
assume that it is 5. After that, we get 600 = 512+53b+7c which simplifies to 88 = 53b+7c

From here, we notice that if b = 1, then c = 5. Since a = 4, b = 1, c = 5 and all


of those digits are  7, we have found our solution set.

We can plug in these numbers into either the base 8 or base 11 number to find the value
of N to be 621.

Problem 2.5.6 — Find the sum (in base 10) of the three greatest numbers less
than 1000 in base 10 that are palindromes in both base 10 and base 5.
Source: 2020 PUMAC

Solution: In this problem, we will first convert 1000 to base 5 to get 130005 .
We know that the maximum number of digits in base 5 for our numbers must be 5. We
can do casework on the number of digits in base 5.

Case 1: Our base 5 number has 5 digits


It’s obvious that the first digit must be 1 or else it will be more than 130005
Our number is 1aba1 = 626 + 130a + 25b
Digit a must be 0, 1, or 2 because if it is 3, then it will be greater than 130005 .

Subcase 1.1: a is 2. This gives 626 + 260 + 25b which is 886 + 25b.
There will be no numbers that will be a palindrome in base 10 in this case.

Subcase 1.2: a is 1. This gives 626 + 130 + 25b which is 756 + 25b, and there will be
nothing that works in this case.

Subcase 1.3 : a is 0. This gives 626 + 25b. In this case however, b can be 1 or 0,
and we’ll get 626 and 656 as our possible values.

Case 2: Our base 5 number has 4 digits


Our number is abba. Expanding it in base 5 gives 53 · a + 52 · b + 51 · b + 50 · a which
gives 126a + 30b.

Since we know that a and b can’t be greater than 4, let’s assume a is 4 to maxi-
mize that number. However, we realize we form no palindromes in that case. Similarly
for a = 3, there will be no possible palindromes. However, for a = 2, we get 252 + 30b.
252 is a palindrome, but if we substitute 1 for b, then we get a larger palindrome which
is 282.

28
Ritvik Rustagi (October 2023) ACE The AMC 10 and AMC 12

Our 3 palindromes are 282 + 626 + 656 which is 1584.

§2.6 Working with unit digits


Many AMC and AIME problems have problems in which you have to observe the unit
digits. Often, the unit digit repeats in cycles. The only way to learn how to do these
problems is to practice. There isn’t much theory to it.

Problem 2.6.1 — What is the units digit of 132003 ?


(A) 1 (B) 3 (C) 7 (D) 8 (E) 9
Source: 2003 AMC 10

Solution: For this problem, we only need to find a pattern to see what the unit digit
will be when the exponent of 13 is 2003.
Units Digits of a Few Powers of 13
131 = 3
132 = 9
133 = 7
134 = 1
135 = 3
136 = 9
137 = 7
138 = 1
Clearly, the units digit cycles with a period of 4. It repeats the pattern of 3, 9, 7, 1.
We notice that whenever the exponent’s remainder divided by 4 is 1, 2, 3, 0, the units
digit respectively is 3, 9, 7, 1. Since 2003 has a remainder of 3 when divided by 4, that
ultimately means the unit digit is 7 (C).

Problem 2.6.2 — For a positive integer n, let dn be the units digit of 1 + 2 + · · · + n.


Find the remainder when
2017
X
dn
n=1

is divided by 1000.
Source: 2017 AIME

Solution: This is another problem in which we need to find a pattern. We are supposed
to find the units digit for 2017 summations. We will try to find a pattern by finding the
unitsPdigit of a values of dn .
dn = ni=1 i
P1
d1 = i=1 i =1

P2
d2 = i=1 i =3

29
Ritvik Rustagi (October 2023) ACE The AMC 10 and AMC 12
P3
d3 = i=1 i =6

P4
d4 = i=1 i =0

P5
d5 = i=1 i =5

P6
d6 = i=1 i =1

P7
d7 = i=1 i =8

P
d8 = 8i=1 i = 6
If we continue this pattern then we get a pattern with a period of 20. The digits
alternate in the pattern

1, 3, 6, 0, 5, 1, 8, 6, 5, 5, 6, 8, 1, 5, 0, 6, 3, 1, 0, 0,

.
This
⌅ 2017 ⇧cycle sums to 70. We find how many times this cycle fully repeats itself.
20 = 100.
However, in the last 17 times there won’t be a full cycle so we will individually add
those terms to find the total sum. 100 · 70=7000 + 69. The total sum is 7069, and after
dividing this by 1000, we get 69.

§2.7 Modular Arithmetic Introduction


People sometimes get confused by the word mod, but it’s time to clear it up. When you
say 8 is divisible by 4, you can simply say 8 ⌘ 0 (mod 4). All this means is that when 8
is divisible by 4, the remainder is 0. For example, 4, 8, 12, 16, 20, 24 are all 0 in mod 4.
This means that when you divide all of those numbers by 4, you always get a remainder
of 0.
⌘ is the sign used in modular arithmetic. It just means that two numbers are congruent
(meaning the remainder is the same when divided by a specific number).

Modular Arithmetic Properties

Now we will solve some problems before moving onto more complex topics like Fermat’s
Little Theorem and Euler’s Totient Theorem.

30
Ritvik Rustagi (October 2023) ACE The AMC 10 and AMC 12

Problem 2.7.1 — The base-nine representation of the number N is 27,006,000,052nine .


What is the remainder when N is divided by 5?
(A) 0 (B) 1 (C) 2 (D) 3 (E) 4
Source: 2021 AMC 12

Solution: We need to solve this problem by converting this base 9 number to base 10
using the methods discussed before. We will rewrite this number below.

2 · 910 + 7 · 99 + 6 · 96 + 5 · 91 + 2 · 90

Now, we will take this number (mod) 5 meaning we want to find the remainder when we
divide it by 5. Since 9 mod 5 is simply 1, we can easily find the value of our expression
in (mod) 5. Plugging in 1 in the place of 9 and solving it gives us 2 7 + 6 5 + 2
which evaluates to 2. Since 2 isn’t directly a remainder, we simply add 5 to this to
get 3(D).

Problem 2.7.2 — Find the remainder when 9 ⇥ 99 ⇥ 999 ⇥ · · · ⇥ 99 · · · 9} is divided


| {z
999 9’s
by 1000.
Source: 2010 AIME

Solution: In this problem, we will try to reduce the numbers mod 1000. We will leave 9
and 99 the way they are. However, we notice that whenever we divide 999, or 9999, or
any more numbers like that, then the remainder mod 1000 is simply 1.

We are simply left to evaluate 9 · 99 · 1997 . This evaluates 891. We simply add
1000 to this to get 109.

Problem 2.7.3 — Positive integers a, b, and c are randomly and independently


selected with replacement from the set {1, 2, 3, . . . , 2010}. What is the probability
that abc + ab + a is divisible by 3?
1 29 31 11 13
(A) (B) (C) (D) (E)
3 81 81 27 27
Source: 2010 AMC

Solution: abc + ab + a is equivalent to a(bc + b + 1). Either a can be divisible by 3 or


bc + b + 1 or both.

If a is divisible by 3, then b and c can be anything. There is a 13 chance of this


happening (since 13 is the ratio of the amount of numbers divisible by 3 in the set from 1
to 2010).

Now, we will take the case when a isn’t divisible by 3. In this case, b and c can’t
take up all the values so we have to consider when bc + b + 1 is divisible by 3. Instead of
checking each big number, we will simply just check 3 digits for each which are 0, 1, 2 as
those are the only possible remainders modulo 3.

If b is 0 mod 3, then we can plug that into bc + b + 1 to see what the remainder

31
Ritvik Rustagi (October 2023) ACE The AMC 10 and AMC 12

will be. 0 · c + 0 + 1 is always 1 mod 3. Thus, that isn’t a possible case.


Now we will check when b is 1 mod 3. We plug that into bc + b + 1 to get c + 2. This
will be divisible by 3 when c is 1 mod 3. Thus, our expression is divisible by 3 when b is
1 mod 3 and c is 1 mod 3.
Now we will check when b is 2 mod 3. We plug in 2 in replacement of b in our expres-
sion to get 2c + 3 which reduces to 2c mod 3. This is only divisible by 3 when c is 0 mod 3.

Since a isn’t divisible by 3 in the subcase, there is a 23 chance of that happening.


For each subcase that works, there is a 13 chance of getting the condition for b and the
same probability applies for c. Multiply the probabilities for satisfying the conditions for
2
a, b, and c gives 27 . We need to multiply this number by 2 since 2 subcases work. We
4
now get 27 .

1 4 13
Now we add up 3 and 27 to get 27 (E).

§2.8 Fermat’s Little Theorem and Euler’s Totient Function


This is one of the most important and most common topic that shows up on the AMC
and AIME.
The simple example below will be teaching you Euler’s Totient Function.

Example 2.8.1
How many numbers are relatively prime to 48?

Solution: Relatively prime means that the GCD of 48 and the numbers less than that
are just 1. This can be done by using this function. If you don’t know this function,
you’re probably gonna count by listing out 1, 5, 7, and so on. This will take a long time.
However, this function just involves us to find the prime factorization of 48. The prime
factorization of 48.

We know that the prime factorization is just 24 · 3. This theorem states that we
take the reciprocal of each of the prime numbers that divide a certain number. After
that, we subtract that reciprocal from 1.

If we take those exact steps, we’ll get 1 12 = 12 and 1 13 = 23 . Now we have two frac-
tions that are 12 and 23 . We find the number of relatively prime numbers to 48 by
multiplying those 2 fractions to 48. After we multiply 48 with 12 and 23 , we get 16 which
is indeed our answer.

There is a picture of the theorem below, but it’s fine if you don’t understand the
symbols since we made this hand typed explanation for that reason. The symbol for
representing the value you get for a number by using the euler’s totient function is .
For example, of 48 is 16.

I have attached the formula with the original terminology below, but even if you don’t
understand it, don’t worry because we just explained it to you.

32
Ritvik Rustagi (October 2023) ACE The AMC 10 and AMC 12

We can use the Euler’s Totient Function in key modular arithmetic problems.

Theorem 2.8.2
Euler’s Totient Function: If a is an integer that is relatively prime to n, then
a (n) ⌘ 1 (mod n) is true

The Fermat’s Little Theorem is similar and is widely used in number theory prob-
lems.

Theorem 2.8.3
The Fermat’s Little Theorem: If there is an integer a, and p is a prime number,
and the number a isn’t divisible by p, then ap 1 ⌘ 1 (mod p).

The best way to solidify your understanding with both of these theorems is to practice a
few problems.

Problem 2.8.4 — Find the largest positive integer n such that n (n) is a perfect
square. ( (n) is the number of integers k, 1  k  n that are relatively prime to n)
Source: 2010 PUMAC

Solution: In this problem, we will rewrite the expression n (n). We will rewrite n as a
product of its prime factors. Pretend there’s a prime factor p1 with an exponent of e1 .
(n) for this prime factor will simply be pe11 ·(1 p11 ).

The expression multiplied above gives (pe11 1


· (p1 1). We multiply this to the value pe11
to get p2e
1
1 1
· (p1 1).
Qx 2ei 1
i=1 pi · (pi 1) is the value of the expression n (n). p1 , p2 , p3 , ... px repre-
sent the x prime factors of n.

From the expression above, we notice that our largest prime factor will always have an
odd exponent. The reason is that 2e1 1 is always going to be an odd number. Thus,
that means our expression can never be a perfect square.

However, it’s obvious that n = 1 works as an answer.

33
Ritvik Rustagi (October 2023) ACE The AMC 10 and AMC 12

Problem 2.8.5 — An integer N is selected at random in the range 1  N  2020 .


What is the probability that the remainder when N 16 is divided by 5 is 1?
(A) 15 (B) 25 (C) 35 (D) 45 (E) 1
Source: 2017 AMC 10

Solution: Using the Fermat’s Little Theorem, we know that N 4 (mod) 5 is always 1
whenever N is relatively prime to 5 (meaning N mod 5 cannot be 0). If we raise N 4 to
the fourth power then we simply get N 16 ⌘ 1 ( mod ) 5. This is what we want, and it
always works whenever N isn’t 0 mod 5. That means that N must be 1, 2, 3, or 4 mod 5
4
giving a probability of
5

§2.9 Chinese Remainder Theorem


The Chinese Remainder Theorem is useful for solving multiple linear congruence equations
and combining the divisors.

The picture above can be very confusing to understand. It’s just full of variables, but
it’s time to clear it up. The chinese remainder theorem solves a set of linear congruences.
The example below will clear it up.
x ⌘ 1 (mod 5)
x ⌘ 2 (mod 6)
x ⌘ 3 (mod 7)

First, make a chart. If you have 3 linear congruences, then make a 3 by 3 table. You
need to have 3 columns always, but the amount of rows is the same thing as the amount
of expressions you have. Designate the first row to the first expression, the second to the
second one, and the third to the third one. In the middle column, multiply all of the
divisors except the one that is used in the expression. For example, in the first one, I
will only multiply 6 and 7, but exclude 5. Do the same for all 3 steps. In the left most
column, write down all the remainders that you want. Remember that they all have to
be in order. Order is what matters the most. Now our next step is to literally just use
the linear statements we have at the top, and multiply the variable with the values in

34
Ritvik Rustagi (October 2023) ACE The AMC 10 and AMC 12

our middle column in order.

42x ⌘ 1 (mod 5)
35x ⌘ 2 (mod 6)
30x ⌘ 3 (mod 7)

Now, we know that 42x is the same thing as 2x in mod 5 because 40 is a multiple
of 5. We do this to all the expressions.

2x ⌘ 1 (mod 5)
5x ⌘ 2 (mod 6)
2x ⌘ 3 (mod 7)

Now we will individually solve each of the x terms and put it in the rightmost col-
umn. We want to see what value of x makes 2x ⌘ 1 (mod 5). This can be done by simple
trial and error. After we do that, we find that the value of x is just 3. We do the same
for all the equations to get 3, 5, and 4.

1 6 ⇥ 7 = 42 3
2 5 ⇥ 7 = 35 5
3 5 ⇥ 6 = 30 4

Our last step is to multiply the terms in each row. After we do that, we get 1 ⇥ 42 ⇥ 3,
2 ⇥ 35 ⇥ 5, and 3 ⇥ 30 ⇥ 4.
Then, you add all of those terms to each other to get your answer. After we add, we get
126 + 350 + 360 = 836.

Definition 2.9.1
When using the Chinese Remainder Theorem, split the large divisor into smaller
ones, but make sure that the smaller ones are relatively prime to each other. For
example, if I want to check if a number is divisible by 72, I can work with 8 and 9
separately.

The Chinese Remainder Theorem shows up often on the AIME, but it’s not that
common on the AMC. The most important idea that you need to know has already been
listed above. It’s about splitting the divisor into smaller numbers. In many cases, many
numbers that you will test will be modulo 10, 100, and 1000. You can split them as 2
and 5, 4 and 25, and 8 and 125 respectively.

Problem 2.9.2 — Let N = 123456789101112 . . . 4344 be the 79-digit number that


is formed by writing the integers from 1 to 44 in order, one after the other. What is
the remainder when N is divided by 45?
(A) 1 (B) 4 (C) 9 (D) 18 (E) 44
Source: 2017 AMC

Solution: In this problem, we can use the Chinese Remainder Theorem. We can split
45 to two di↵erent divisors which are 5 and 9 and work separately with both. If N is
divisible by 45 then it must also be divisible by 5 and 9.

35
Ritvik Rustagi (October 2023) ACE The AMC 10 and AMC 12

Directly trying to divide the 79 digit number by 9 is a tough job. However, we can use
divisibility rules. We know that the sum of the digits of any number modulo 9 is equal
to the number modulo 9.
Sum of Digits of N ⌘ N (mod 9)
The sum of the digits is simply the sum of the numbers from 1 to 44 which is 44·45
2 . This
is 990 which is 0 mod 9 which means that N must also be.

N ⌘ 0 mod 9

To see the remainder when dividing by 5, we simply have to look at the units digit only
and take that mod 5. In this case, the remainder when we divide the last digit by 5 is
simply 4.
N ⌘ 4 mod 5
N ⌘ 0 mod 9

Now using the Chinese Remainder Theorem, we get the remainder as 9 (C).

Problem 2.9.3 — It is known that, for all positive integers k, 12 +22 +32 +. . .+k 2 =
k(k+1)(2k+1)
6 . Find the smallest positive integer k such that 12 + 22 + 32 + . . . + k 2 is
a multiple of 200.
Source: 2002 AIME

Solution: In this problem, we know that the sum of the squares must be divisible by
200. However, we can use the formula for the sum of the squares and take that mod 200.
Before we directly use the formula, we can take the 6 from the denominator out and take
the numerator mod 1200.
k(k + 1)(2k + 1) ⌘ (mod 1200)
Now because of the Chinese Remainder Theorem, we can split 1200 into 3 and 16 and 25
and write separate linear congruency statements for those 3 divisors.
For the case of dividing by 3, we will test equating k to 0 and 1 and 2 mod 3 separately
and seeing if the product is 0 mod 3. When we do it for all 3 cases, we notice it is always
0 mod 3 which means there are no restrictions for this case. We can move on.

k(k + 1)(2k + 1) ⌘ 0 (mod 16)


For the case of dividing by 16, k must either be 0 or 15 mod 16 for the whole product to
be divisible by 16.

k(k + 1)(2k + 1) ⌘ 0 (mod 25)

For the case of dividing by 25, k must either be 0 or 12 or 24 mod 25 for the whole
product to be divisible by 25.

Applying the Chinese Remainder Theorem for each pair of possibilities for the modulo
16 case and the modulo 25 case, we get the answer to be 112.

Problem 2.9.4 — Let 21110 ⌘ n (mod 1111) with 0  n  1111. Compute n


Source: 2019 BMT

Solution: In this problem, we know that 1111 is 11 · 101. We will separate the modular

36
Ritvik Rustagi (October 2023) ACE The AMC 10 and AMC 12

equation and solve it separately for modulo 11 and 101.

21110 ⌘? (mod 11)


21110 ⌘? (mod 101)

In the equation with mod 11, we know that 210 is 1 mod 11 because of Fermat’s
Little Theorem. At the same time, 21110 is just 210·111 so it must also be 1 mod 11.
21110 ⌘ 1 (mod 11)

For modulo 101: from fermat’s little theorem, we know that 2100 ⌘ 1 (mod 101).
We can raise that to the power of 11 to get 21100 ⌘ 1 (mod 101). Thus, we are simply
left with 210 and we know that 210 (mod 101) is simply 14. We now have solved our two
individual equations.

21110 ⌘ 1 (mod 11)


21110 ⌘ 14 (mod 101)

Solving them gives 21110 ⌘ 1024 (mod 1111). Our final answer is just 1024.

Problem 2.9.5 — The positive integers N and N 2 both end in the same sequence
of four digits abcd when written in base 10, where digit a is not zero. Find the
three-digit number abc.
Source: 2014 AIME

Solution: We will write down a few modular equations and work from there.
N 2 ⌘ abcd (mod 10000)
N ⌘ abcd (mod 10000)

We can now subtract the two statements from each other since both are being divided by
the same number which is 10000 in this case. If you still don’t understand why I was
able to subtract both statements, then look back to the very basics of modular arithmetic.

N 2 -N ⌘ 0 (mod 10000)
N (N 1) ⌘ 0 (mod 10000)

We now can distribute 10000 and write it out as 16 and 625. (This comes from our
techniques that we learned for CRT)

N (N 1) ⌘ (0 mod 16)
N (N 1) ⌘ (0 mod 625)

Now we notice one thing. Only one of N and N 1 can be divisible by 2 because
one must be even while the other must be odd since they are consecutive numbers. Two
consecutive numbers can’t both be divisible by 2. Similarly, only one can be divisible by
5. Thus, we have two cases.
Either N is divisible by 16 while N 1 is divisible by 625 or N is divisible by 125 and
N 1 is divisible by 16.
We will try one case first to see if we get an answer.

N ⌘ 0 (mod 16)

37
Ritvik Rustagi (October 2023) ACE The AMC 10 and AMC 12

N-1 ⌘ 0 (mod 625)


Using CRT for the system above, we get the answer to be 9376 (mod 10000). 9376
represents abcd, and we only want the first 3 digits. Thus, our final answer is 937.

§2.10 Cumulative Problems


Now it’s time to work on more problems because this is the only way to solidify your
understanding.

Problem 2.10.1 — In base 10, the number 2013 ends in the digit 3. In base 9, on
the other hand, the same number is written as (2676)9 and ends in the digit 6. For
how many positive integers b does the base-b-representation of 2013 end in the digit
3?
(A) 6 (B) 9 (C) 13 (D) 16 (E) 18
Source: 2013 AMC 10

Solution: The units digit in base b is always the number given modulo b. Similarly, the
last 2 digits is the number given modulo b2 . In this case, we jut want the units digit so
we take 2013 modulo b.

2013 ⌘ 3 (mod b)
2010 ⌘ 0 (mod b)

From our equation, we know that b divides 2010. We will find the number of fac-
tors in 2010 by prime factorizing first.

2010 = 2 ⇥ 3 ⇥ 5 ⇥ 67

The number of factors are found by adding 1 to all the exponents and multiplying
those numbers.
Number Of Factors is (1 + 1) · (1 + 1) · (1 + 1) · (1 + 1) which is 16

However, this isn’t the answer. We must subtract a few cases. A number in base b can’t
have any digits greater than or equal to b. That means our base must be 4 or greater
since 2013 has 3 as the largest digit. However, 1, 2, and 3 are all factors of 2010 that were
included in the number 16 we calculated. Thus, we must subtract 3 to get 13 which is (C).

Problem 2.10.2 — What is the remainder when 122011 + 112012 is divided by seven?
Source: 2012 UNCO

Solution: In this problem, we will use the fermat’s little theorem. Since we want to take
the sum in modulo 7 and find the remainder, we already know that 7 is prime. Since 7
is relatively prime to both 12 and 11, we can use fermat’s little theorem separately to them.

122011 ⌘ ? mod 7
112012 ⌘ ? mod 7
We know that any number relatively prime to 7 raised to the power of 6 will have a
remainder of 1 when divided by 7.

38
Ritvik Rustagi (October 2023) ACE The AMC 10 and AMC 12

126 ⌘ 1 mod 7
116 ⌘ 1 mod 7

We will transform the equations we got using fermat’s little theorem to find the re-
mainder for the large exponents.
(126 )335 · 12 ⌘ 1335 · 12 mod 7
(116 )335 · 112 ⌘ 1335 · 112 mod 7

Simplifying the value for both equations gives us 5 and 2 modulo 7. Adding both
of those and taking it mod 7 gives us a final answer of 0.

Problem 2.10.3 — The smallest three positive proper divisors of an integer n are
d1 < d2 < d3 so that d1 + d2 + d3 = 57. Find the sum of the possible values of d2 .
Source: 2021 PUMAC

Solution: Since d1 , d2 , d3 are the smallest divisors of n, then the smallest one is obviously
1. Thus, d1 is 1.

Plugging it in gives 1 + d2 + d3 = 57.


Subtracting both sides by 1 gives d2 + d3 = 56

Let’s assume that the smallest divisors are 2 prime numbers (prime numbers will obviously
be the smallest since we can’t have something like 15 be the smallest when there are
prime numbers that divide 15 that are smaller than 15 such as 3 and 5)

d2 = p and d3 = q (p and q are prime numbers)


p + q = 56 (we need to find the prime number pairs that sum to 56)
(p, q) can be (3, 53), (13, 43), (19, 37)

We can have another case in which d2 = p and d3 = p2 . Plugging it in gives


p + p2 = 56
Testing prime numbers gives that 7 works for p.

Our possible values of d2 are 3, 13, 19, and 7. The sum of these values are 42.

Problem 2.10.4 — Determine all positive integers a such that a < 100 and a3 + 23
is divisible by 24.
Source: 2018 UNM-PNM

Solution: This is another problem in which we use our modular arithmetic techniques.
a3 + 23 ⌘ 0 (mod 24)
We can subtract 24 from the left side to get
a3 1 ⌘ 0 (mod 24)
We can bring 1 over to the right side to get
a3 ⌘ 1 (mod 24)

From here, we can use the Chinese remainder theorem techniques to separate the

39
Ritvik Rustagi (October 2023) ACE The AMC 10 and AMC 12

divisor 24 into smaller terms that are relatively prime to each other. We will use 8 and 3.

a3 ⌘ 1 (mod 3)
a3 ⌘ 1 (mod 8)

Now we will first test all the possible remainders separately for 3 and 8 since both
are small numbers. We will cube them and see which ones have a remainder of 1.

a a3 a3 mod 3
0 0 0
1 1 1
2 8 2

Clearly, a must be 1 (mod 3).

a a3 a3 (mod 8)
0 0 0
1 1 1
2 8 0
3 27 3
4 64 0
5 125 5
6 216 0
7 343 7

We see that a must be 1 mod 8 since that’s the only case that makes a3 have a remainder
of 1 when divided by 8.
a ⌘ 1 (mod 3)
a ⌘ 1 (mod 8)
Both the equations solve to a ⌘ 1 (mod 24). Our solutions less than 100 simply are 1,
25, 49, 74, and 99.

Problem 2.10.5 — A number m is randomly selected from the set {11, 13, 15, 17, 19},
and a number n is randomly selected from {1999, 2000, 2001, . . . , 2018}. What is the
probability that mn has a units digit of 1?
(A) 15 (B) 14 3
(C) 10 (D) 20 7
(E) 25
Source: 2018 AMC 10

Solution: In this problem, we will be dealing with units digits only. Thus, from all the
numbers m, we just need to look at their units digit since this is a mod 10 problem. We
can take all of the bases mod 10 to change the set from {11, 13, 15, 17, 19} to {1, 3, 5, 7, 9}
Now with this new set, we can work separately with each digit starting with 1.

1 raised to any exponent will always have a units digit of 1. Thus, there are 20 cases
here since all exponents from 1999 to 2018 will work.

Now we will work with 3. We will look for the period for the units digit when raising 3.
31 =3

40
Ritvik Rustagi (October 2023) ACE The AMC 10 and AMC 12

32 =9
33 =27 ⌘ 7 mod 10
34 =81 ⌘ 1 mod 10
35 =243 ⌘ 3 mod 10
36 =729 ⌘ 9 mod 10
We see that the units digits simply repeat with a period of 4. Thus, this case will work
with 5 exponents.

We will now work with 5. 5 raised to any power will always end with 5, so there
are 0 cases for this.

We will now work with 7.


71 =7
72 =49 ⌘ 9 mod 10
73 =343 ⌘ 3 mod 10
74 =2401 ⌘ 1 mod 10
75 =16807 ⌘ 7 mod 10
76 =117649 ⌘ 9 mod 10
This case also repeats with a period of 4. Thus, this case will work with 5 exponents.

We will now work with 9. We do the same thing that we did for 3 and 7 to get 5
again.
The total number of cases that work are 20+5+0+5+5 which is 40. The total number of
cases in general are 5 ⇥ 20 which is 100. 40 / 100 simplifies to 25 (E).

Problem 2.10.6 — What is the sum of all positive integers n such that lcm(2n, n2 )
= 14n 24?
Source: 2015 PUMaC

Solution: We will try to simplify lcm(2n, n2 ). Since n is included on both sides, we can
take it out and we know the lcm is equivalent to n · lcm(2, n).
Now we will have two cases. Either n can be odd or even.

Case 1: n is odd
If n is odd, the lcm must be 2n. The reason for this is that there are no common factors
in between n and 2, so we can multiply both numbers. However, we can’t just simply
equate 2n to 14n 24. We have to multiply the LCM we found to n since we took that
out in the beginning.

2n2 =14n 24
Dividing by 2 and bringing the terms to one side and factoring gives
(n 3)(n 4)=0
n must equal to 3 or 4. However, only 3 works because in this case we assumed that n is
odd, so we must discard 4.

Case 2: n is even
If n is even, the lcm(2, n) must simply be n. The reason for this is that n is already
divisible by 2, so we don’t nee to multiply it by 2 like how we did for the first case. Now
we will multiply n by n since we took it out in the beginning.

41
Ritvik Rustagi (October 2023) ACE The AMC 10 and AMC 12

n2 =14n -24
Bringing the terms to one side and factoring gives
(n 2)(n 120=0
n must be equal to 2 or 12. Both in this case are even, so both work as answers.

We add up our solutions 3+2+12 to get 17.

Problem 2.10.7 — Albert has a very large bag of candies and he wants to share all
of it with his friends. At first, he splits the candies evenly amongst his 20 friends and
himself and he finds that there are five left over. Ante arrives, and they redistribute
the candies evenly again. This time, there are three left over. If the bag contains
over 500 candies, what is the fewest number of candies the bag can contain?
Source: 2012 PUMAC

Solution: This problem is much easier than it looks at first sight. It looks long, but
the problem is very simple. We will try to write this problem in math terms. Let’s
assume that the total number of candies are n. When the candy is split among his 20
friends and him (21 people in total), 5 are leftover. We can write this as
n ⌘ 5 (mod 21)

After another person joins, there are 22 people in total. This time, 3 are leftover.
n ⌘ (3 mod 22)

We can solve both of the linear statements using Chinese Remainder Theorem to get
n ⌘ 47 (mod 462)
Since we want the answer to be more than 500, we add 462 to 47 to get 509.

x2 6
Problem 2.10.8 — How many integer x are there such that x 6 is a positive
integer?

Solution: We will combine an algebraic technique to this problem. We will first use
long division to divide the fraction. Long division gives us x + 6 + x306 .

This will be an integer whenever x 6 divides 30. We will write out the divisors
of 30 and see what values of x will make x 6 divide it.
Divisors of 30 are 1, 2, 3, 5, 6, 10, 15, and 30. It’s important to note that x 6 doesn’t
have to equal to a positive divisor. It can be that same divisor but negative!

Possible values of x 6 so far are 1, 2, 3, 5, 6, 10, 15, 30, 1, 2, 3, 5, 6,


10, 15, and 30.

The respective values of x that allow x 6 to equate to those values can be found
by simply adding 6 to all of the numbers to get

7, 8, 9, 11, 12, 16, 21, 36, 5, 4, 3, 1, 0, 4, 9, and 24.

However, plugging in those values of x might not make the whole expression x + 6

42
Ritvik Rustagi (October 2023) ACE The AMC 10 and AMC 12

+ x306 positive. Only the first 8 values make the entire term positive. Thus, the answer
is 8.

Problem 2.10.9 — How many positive integers n are there such that n  2012,
and the greatest common divisor of n and 2012 is a prime number?
Source: 2012 PUMAC

Solution: We will prime factorize 2012 into 22 · 503. The gcd of the two numbers in this
problem must either be 2 or 503 as those are the only unique prime factors that divide 2012.

Case 1: The GCD of n and 2012 is 2


Any even value of n will have a gcd of 2 except the ones that are divisible by 4 and 503.
The only even number divisible by 2 (not 4) and 503 that is less than 2012 is 1006. On
top of this, we must subtract all multiples of 4. Thus, there. are 2012
4 values of n, but we
have to subtract 1 to this to remove 1006. This boils down to 502

Case 1: The GCD of n and 2012 is 503


Now n must be divisible by 503 but not 2 or else the gcd will become 1006. There are
only two possibilities for n here, 503 and 1509 giving us 2 cases.
The final answer is 52 + 2 which is 54.

Problem 2.10.10 — Let N be the greatest integer multiple of 36 all of whose digits
are even and no two of whose digits are the same. Find the remainder when N is
divided by 1000.
Source: 2010 AIME

Solution: In this problem, since we know that the digits are even, the only possible
values for the digits are 0, 2, 4, 6, and 8. We also know that none of the digits can
be repeated. Thus, we only have to work with these 5 digits without having to worry
about repeats. Since we want to maximize our number, it’s best to write the largest digit
towards the left an smallest to the right to get 86420.

Now we need to check if it’s divisible by 36. Clearly our number isn’t ivisible by 9
since the sum of the digits isn’t. Thus, we have to remove one digit so that the sum of
the digits becomes 9 or 18. Some inspection shows us that we simply have to remove the
digit 2 to make the sum of the digits divisible by 9. After we do that, we get 8640. This
number is clearly divisible by 36, so we just have to divide it by 1000 to find our final
answer to be 640.

43
Ritvik Rustagi (October 2023) ACE The AMC 10 and AMC 12

Problem 2.10.11 — There are positive integers x and y that satisfy the system of
equations
log10 x + 2 log10 (gcd(x, y)) = 60
log10 y + 2 log10 (lcm(x, y)) = 570.
Let m be the number of (not necessarily distinct) prime factors in the prime
factorization of x, and let n be the number of (not necessarily distinct) prime factors
in the prime factorization of y. Find 3m + 2n.
Source: 2019 AIME 1

Solution: In this problem, we need to find a way to simplify the algebraic equations to
get rid of the lcm and gcds. We remember one rule that we learned

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

To get a similar result as shown above, we will add (not multiply) the two equations to get

log10 x + 2 log10 (gcd(x, y)) + log10 y + 2 log10 (lcm(x, y)) = 630

Using our logarithm rules, we get

log(xy) + 2(log(gcd(x, y) · lcm(x, y))) = 630

Using the rule a · b = lcm(a, b) · gcd(a, b). and simplifying, we get

log10 xy = 210
Solving for xy gives us 10210
However, now we are stuck. We will assume x and y are both powers of 10. x is less than
y, and x is 10a while y is 10b .

We will plug this back into the equation given originally.

log10 10a + 2 log10 (gcd(10a , 10b )) = 60

Since we know that x is less than y as stated before, the GCD simply is 10a .

a + 2a = 60
a = 20
Now that we got the value of a which is the exponent of x, we can quickly find that b is
190 since xy = 10210 .

Now we need to find the number of not necessarily di↵erent prime factors in x and
y. Since x is 220 · 520 while y is 2190 · 5190 , x has 40 unique prime factors while y has
380.
Plugging this into 3m + 2n gives an answer of 880.

44
Ritvik Rustagi (October 2023) ACE The AMC 10 and AMC 12

Problem 2.10.12 — Positive integer n has the property such that n64 is a positive
perfect cube. Suppose that n is divisible by 37. What is the smallest possible value
of n?
Source: 2018 SMT

Solution: Since we know that n is divisible by 37, let’s assume that n = 37a where a is
also a positive integer.
Now we know that 37a 64 is a perfect cube. Let’s assume our cube is x3 .

n = 37a 64 = x3
n = 37a = x3 + 64
Recalling the fact that x3 + y 3 = (x + y)(x2 xy + y 2 ) alows us to factor x3 + 64

37a = (x + 4)(x2 4x + 16)


Now since 37 is a prime number, it can only either divide x + 4 or x2 4x + 16

If it divides x + 4, then x has to be 33.

Now let’s assume that 37 divides x2 4x + 16 for our second case.


If we simply try assuming that this value equals to x2 4x + 16, we can rearrange it
before solving it to get x2 4x 21 = 0
This factors as (x + 3)(x 7) = 0 which tells us that our value of x should be 7. We can
plug this into n = 37a = x3 + 64 to get that n = 73 + 64 which is 407.

Problem 2.10.13 — Find the number of eight-digit positive integers that are
multiples of 9 and have all distinct digits
Source: 2018 HMMT

Solution: In this problem, we have 10 possible digits from 0 to 9, and all 10 digits sum
to 45. Thus, if we want a number with 8 distinct digits, we must remove 2 numbers from
0 to 9.

Since the sum of the 8 digits should be divisible by 9 for that number to be divisi-
ble by 9, we know that the 2 digits we remove must also sum to a multiple of 9. The
only possible pairs of numbers that will work are (0, 9), (1, 8), (2, 7), (3, 6), and (4, 5).

If we remove 0 and 9, then there are simply 8! (8 factorial) ways to arrange those
digits.

For the other 4 pairs of 2 digits, there are 7 places where we can put the 0 (every
place except for the first digit), and there are 7! ways to rearrange the remaining num-
bers.
This means there are 7 · 7! ways, and we multiply this by 4 since there are 4 pairs.

8! + 28 · 7! = 36 · 7! which is 181440.

Problem 2.10.14 — What is the smallest positive integer n such that 2016n is a
perfect cube?
Source: 2018 HMMT

45
Ritvik Rustagi (October 2023) ACE The AMC 10 and AMC 12

Solution: In this problem, we’ll first prime factorize 2016 to get 25 · 32 · 7.

To make this a perfect cube, all exponents should be divisible by 3. For that, we
should add one power of 2 so the exponent becomes 6. We do the same for 3. For 7, we
multiply 2016 by 72 so the exponent will become 3.

Thus, n is 2 · 3 · 72 which is 294.

2022
Problem 2.10.15 — What are the last two digits of 20222022 ?
Source: 2022 SMT

Solution: Finding the last two digits is equivalent to finding the number mod 100.
Using the Chinese Remainder Theorem, we can separate 100 to 4 and 25 and find the
number mod 4 and mod 25 separately.
2022
20222022 ⌘? mod 4
2022 2022
2022 ⌘? mod 25
2022
Clearly 20222022 ⌘ 0 mod 4, because 2022 is divisible by 2 and it is raised to a
very high power.

For the mod 25 equation, we can use Euler’s Totient function and we know that 202220 ⌘ 1
mod 25

However, our exponent for base 2022 is 20222022 , so we can take that exponent mod 20.
We should split this up into mod 4 and 5 to use the Chinese Remainder Theorem.

20222022 ⌘ 0 mod 4
20222022 ⌘ 22022 mod 5

Clearly our expression in mod 5 is simply 4, and we can find that using our tech-
nique in the pattern for units digit.
Since we know that 20222022 ⌘ 0 mod 4 and 20222022 ⌘ 4 mod 5, we can use the Chinese
Remainder Theorem to find that 20222022 ⌘ 4 mod 20.
2022
Using that, we know that 20222022 ⌘ 20224 ⌘ ( 3)4 mod 25
We now get 81 ⌘ 6 mod 25.

Since we know that


2022
20222022 ⌘ 0 mod 4
2022
20222022 ⌘ 6 mod 25
Using this we know that our expression’s last 2 digits are 56.

46
Ritvik Rustagi (October 2023) ACE The AMC 10 and AMC 12

Problem 2.10.16 — Digits H, M , and C satisfy the following relations where ABC
denotes the number whose digits in base 10 are A, B, and C.

H xH =M ×C +1
HH × H = M C × C + 1
HHH × H = M CC × C + 1

Find HM C.
Source: 2011 CHMMC

Solution: In this problem, we can expand HH as 10H + H which is 11H. We can


expand HHH as 100H + 10H + H which is 111H.

M C = 10M + C
M CC = 100M + 10C + C = 100M + 11C

We can convert those three equations into


H2 = M C + 1
11H 2 = 10M C + C 2 + 1
111H 2 = 100M C + 11C 2 + 1

We can multiply the first equation by 11 and equate it to the second equation to
get
10M C + C 2 + 1 = 11M C + 11

Rearranging and factoring this equation gives C(C M ) = 10

From here, we can plug in possible values for C since it must divide 10. The only
possible values are 1, 2, 5

Testing all values gives that C must be 5 and plugging this into that equation gives
M = 2. We now plug this into H 2 = M C + 1 to get that H = 4.

These digits gives that our number HM C is 435.

Problem 2.10.17 — Given k 1, let pk denote the k-th smallest prime number. If
N is the number of ordered 4-tuples (a, b, c, d) of positive integers satisfying abcd =
Q2023
k=1 pk with a < b and c < d, find N mod (1000)
Source: 2022 PUMAC

Solution: In this problem, we will work separately with ab and cd.


From the 2023 prime factors of abcd, we can have as many as 1 to 2022 prime factors to
divide ab, and the remaining ones will divide cd. The number of ways to choose i prime
factors are 2023
i .

Let’s say that i prime factors divide ab while 2023 i divide cd.
From here, we have 2i ways to distribute the i prime factors for ab and 22023 i ways to
distribute the 2023 i prime factors for cd. However, we need to satisfy the case in which

47
Ritvik Rustagi (October 2023) ACE The AMC 10 and AMC 12

a < b and c < d. For each factor pair of a and b that multiplies to the i prime factors,
since we know that there are 2i ways to distribute them, we have to divide it by 2 to
guarantee that the smaller one will be a.

Using
P2022 that strategy, we get
2023 i 2023 i
i=1 i · 22 · 2 2
P2022 2023
This summation becomes i=1 i · 22021

2023 2023 2023


This simplifies to 22021 ( 1 + 2 ... + 2022 )
P2023 2023
x=0 x = 22023 (this is an identity that you’ll learn in the combinatorics sec-
tion)

2023 2023
However, we must subtract 1 and 2023 from that to get 22023 2

We multiply that expression by 22021 which gives 22021 (22023 2)

This expression can be rewritten as 22022 (22022 1)

Now we use the Chinese Remainder Theorem since we want to find this mod 1000.
We can solve for it mod 8 and 125.
22022 (22022 1) ⌘ 0 mod 8 (Since 23 divides 22022
22022 (22022 1) ⌘? mod 125
Using the Euler’s Totient Theorem gives us that the totient of 125 is 100. This leads to
2100 ⌘ 1 mod 125. Using that and simplifying the expression gives that the remainder
mod 1000 is 112.

48

You might also like