You are on page 1of 9

Olympiad Number Theory Justin Stevens, David Altizio Page 1

Problems and Theorems

Author Editor and LATEX Manager


Justin Stevens David Altizio

Abstract
This is the problem version of the article ”The Basics of Olympiad Number Theory”.
This document is if the reader wants to attempt the problems before reading through the
solutions.

1 Main Theorems
Definition 1. Euler’s Totient Function is defined as the number of positive integers less than n
that are relatively prime to n. The written form of it is φ(n). If n = pe11 pe22 · · · penn is the prime
factorization of n then
    
1 1 1
φ(n) = n 1 − 1− ··· 1 − .
p1 p2 pn

Definition 2. We say that the inverse of a number a modulo m when a and m are relatively
prime is the number b such that ab ≡ 1 (mod m).

Theorem 1. When gcd(a, m) = 1, a always has a distinct inverse mod m.

Theorem 2 (Chinese Remainder Theorem). The system of linear congruences




 x ≡ a1 (mod b1 ),

x ≡ a (mod b ),
2 2


 ···
x ≡ an (mod bn ),

where b1 , b2 , · · · , bn are pairwise relatively prime (aka gcd(bi , bj ) = 1 iff i 6= j) has one distinct
solution for x modulo b1 b2 · · · bn .

Theorem 3 (Euler’s Totient Theorem). For a relatively prime to m, we have aφ(m) ≡ 1 (mod m).
Olympiad Number Theory Justin Stevens, David Altizio Page 2

Theorem 4 (Fermat’s Little Theorem). For a relatively prime to a prime p, we have ap−1 ≡ 1
(mod p).
Theorem 5 (Wilson’s). (p − 1)! ≡ −1 (mod p) for all odd primes p.
Theorem 6. If x2 ≡ −1 (mod p) for odd prime p, then p ≡ 1 (mod 4) and that if p ≡ 1 (mod 4)
then there exists an x such that x2 ≡ −1 (mod p).
Definition 3. We define vp (m) to be the number of times that the prime p occurs in the prime
factorization of m. For example when m = 24 and p = 2 we have v2 (24) = 3 and v3 (24) = 1
because 24 = (23 ) (31 ).
Theorem 7 (Legendre). For all positive integers n and positive primes p, we have
∞  
X n
vp (n!) = .
i=1
pi
Definition 4. The order of a mod m (with a and m relatively prime) is the smallest positive
integer x such that ax ≡ 1 (mod m). We write this as x = ordm a or sometimes shorthanded to
om a.
Definition 5. When the order of a mod m is φ(m) we say that a is a primitive root mod m.
Theorem 8. For relatively prime positive integers a and m
orda m | φm

2 Introductory Problems
2.1 Calculation Problems: Exponentation
Problem 1 (Brilliant.org). For how many integer values of i, 1 ≤ i ≤ 1000, does there exist an
integer j, 1 ≤ j ≤ 1000, such that i is a divisor of 2j − 1? Hint: 40
Problem 2 (Brilliant.org). How many prime numbers p are there such that 29p + 1 is a multiple
of p? Hint: 7
Problem 3 (AIME 1983). Let an = 6n + 8n . Determine the remainder on dividing a83 by 49.
Hint: 46
Problem 4 (All Russian MO 2000). Evaluate the sum
 0  1  2  1000 
2 2 2 2
+ + + ··· + .
3 3 3 3
Hints: 22, 4
Problem 5 (HMMT 2009). Find the last two digits of 10321032 . Express your answer as a two-digit
number. Hint: 10
Problem 6 (Senior Hanoi Open MO 2006). Calculuate the last three digits of 200511 + 200512 +
· · · + 20052006 . Hint: 19
1
···2
20072006
Problem 7 (PuMAC 2008). Calculuate the last 3 digits of 2008 . Hint: 29
xx
Problem 8 (PuMAC). Define f (x) = xx . Find the last two digits of f (17)+f (18)+f (19)+f (20).
Hint: 12
2001
Problem 9 (Canada 2003). Find the last 3 digits of 20032002 . Hint: 25
Olympiad Number Theory Justin Stevens, David Altizio Page 3

2.2 Chinese Remainder Theorem


Problem 10 (AoPS). Show that for c ∈ Z and a prime p, the congruence xx ≡ c (mod p) has a
solution. Hint: 3

Problem 11 (AIME II 2012). For a positive integer p, define the positive integer n to be p-safe if
n differs in absolute value by more than 2 from all multiples of p. For example, the set of 10-safe
numbers is 3, 4, 5, 6, 7, 13, 14, 15, 16, 17, 23, .... Find the number of positive integers less than or
equal to 10, 000 which are simultaneously 7-safe, 11-safe, and 13-safe. Hint: 21

Problem 12 (Balkan). Let n be a positive integer with n ≥ 3. Show that


nn n
nn − nn

is divisible by 1989. Hint: 9

Problem 13. Consider a number line consisting of all positive integers greater than 7. A hole
punch traverses the number line, starting  frrom 7 and working its way up.n! It checks each positive
integer n and punches it if and only if n7 is divisible by 12. (Here nk = (n−k)!k! .) As the hole punch
checks more and more numbers, the fraction of checked numbers that are punched approaches a
limiting number ρ. If ρ can be written in the form m n
, where m and n are positive integers, find
m + n. Hint: 16

Problem 14 (Austin Shapiro). Call a lattice point “visible” if the greatest common divisor of its
coordinates is 1. Prove that there exists a 100 × 100 square on the board none of whose points are
visible. Hint: 11

2.3 Construction Problems


Problem 15 (IMO 2005). Determine all positive integers relatively prime to all the terms of the
infinite sequence 2n + 3n + 6n − 1, n ≥ 1. Hint: 18

Problem 16 (IMO 1989). Prove that for all n we can find a set of n consecutive integers such
that none of them is a power of a prime number. Hint: 32

Problem 17. Let p be a prime. Show that there are infinitely many positive integers n such that
p divides 2n − n. Hint: 24

2.4 Diophantine Equations


Problem 18. Find all pairs of integers (x, y) that satisfy the equation

x2 − y! = 2001.

Hint: 34

Problem 19 (USAMTS). Prove that if m and n are natural numbers that

3m + 3n + 1

cannot be a perfect square. Hint: 6


Olympiad Number Theory Justin Stevens, David Altizio Page 4

Problem 20. Prove that 1919 cannot be written as the sum of a perfect cube and a perfect fourth
power. Hint: 13
Problem 21. Find all solutions to the equation x5 = y 2 + 4 in positive integers. Hint: 30
Problem 22 (USAJMO 2013). Are there integers a, b that that a5 b + 3 and ab5 + 3 are perfect
cubes? Hint: 1

2.5 Order
Problem 23. For positive integers a > 1 and n find ordan −1 (a) Hint: 42
Problem 24 (AIME 2001). How many positive integer multiples of 1001 can be expressed in the
form 10j − 10i , where i and j are integers and 0 ≤ i < j ≤ 99? Hint: 27
Problem 25. Prove that if p is prime, then every prime divisor of 2p − 1 is greater than p. Hint:
14
Problem 26. Let p be an odd prime, and let q and r be primes such that p divides q r + 1. Prove
that either 2r | p − 1 or p | q 2 − 1. Hint: 2
Problem 27 (Classical). Let n be an integer with n ≥ 2. Prove that n doesn’t divide 2n − 1.
Hint: 31
n
Problem 28. Let a > 1 and n be given positive integers. If p is an odd prime divisor of a2 + 1,
prove that p − 1 is divisible by 2n+1 . Hint: 28
Problem 29. Prove that for all positive integers a > 1 and n we have n | φ(an − 1). Hint: 44
Problem 30. If a and b are positive integers relatively prime to m with ax ≡ bx (mod m) and
ay ≡ by (mod m) prove that
agcd(x,y) ≡ bgcd(x,y) (mod m).
Hint: 39
n n
Problem 31. Let a and b be relatively prime integers. Prove that any odd divisor of a2 + b2 is
of the form 2n+1 m + 1. Hint: 33
Problem 32 (Bulgaria 1996). Find all pairs of prime p, q such that pq | (5p − 2p ) (5q − 2q ). Hint:
47

2.6 Miscellaneous
Problem 33. Prove that there are no positive integers x, k and n ≥ 2 such that x2 +1 = k(2n −1).
Hint: 5
Problem 34 (Putnam 2003). Show that for each positive integer n,
Yn jnk
n! = lcm {1, 2, . . . , }
i=1
i
(Here lcm denotes the least common multiple, and bxc denotes the greatest integer ≤ x.) Hint:
43
Problem 35. Let m and n be positive integers posessing the following property: the equation
gcd(11k − 1, m) = gcd(11k − 1, n)
holds for all positive integers k. Prove that m = 11r n for some integer r. Hint: 35
Olympiad Number Theory Justin Stevens, David Altizio Page 5

3 Challenge Problems
Problem 36 (Balkan MO 1999). Let p > 2 be a prime number such that 3|(p − 2). Let
S = {y 2 − x3 − 1|0 ≤ x, y ≤ p − 1 ∩ x, y ∈ Z}
Prove that there are at most p elements of S divisible by p. Hint: 38
Problem 37 (IMO 1971). Prove that we can find an infinite set of positive integers of the form
2n − 3 (such that n is a positive integer) every pair of which are relatively prime. Hint: 41
Problem 38 (USAMO 1991). Show that, for any fixed integer n ≥ 1, the sequence
2 22
2, 22 , 22 , 22 , . . . (mod n)
is eventually constant.
[The tower of exponents is defined by a1 = 2, ai+1 = 2ai . Also ai (mod n) means the remainder
which results from dividing ai by n.] Hint: 20
Problem 39 (ISL 2005 N6). Let a, b be positive integers such that bn + n is a multiple of an + n
for all positive integers n. Prove that a = b. Hint: 17
Problem 40 (USAMO 2005). Prove that the system
x6 + x3 + x3 y + y = 147157
x3 + x3 y + y 2 + y + z 9 = 157147
has no solutions in integers x, y, and z. Hint: 26
Problem 41 (USA TST 2003). Find all ordered triples (p, q, r) such that p | q r + 1, q | rp + 1,
and r | pq + 1. Hint: 8
Problem 42. Prove that for all positive integers n, n! divides
n−1
Y
(2n − 2k ).
k=0

Hint: 45
Problem 43. Exponential diophantine equations! Find all solutions to each individual exponential
equation in positive integers (each part is seperate):
1. 7x = 3y + 4 (India)
2. 2x + 3 = 11y
Hint: 36, 23
Problem 44 (USA TSTST 2013). Define a function f : N → N by f (1) = 1, f (n+1) = f (n)+2f (n)
for every positive integer n. Prove that f (1), f (2), . . . , f (32013 ) leave distinct remainders when
divided by 32013 . Hint: 37
Problem 45 (Korea 1999). Find all positive integers n such that 2n − 1 is a multiple of 3 and
(2n − 1)/3 is a divisor of 4m2 + 1 for some integer m. Hint: 15
Olympiad Number Theory Justin Stevens, David Altizio Page 6

4 Hints
Try your best to avoid reading hints and go back and think about the problem some more. If you
really have to, here are some hints to the problems.

1. Take mod 9.

2. Do cases on ordp (q).

3. The fact that x exists in both the base and the exponent makes this problem tricky. Oh well,
the problem never specifically asked to find this x....

4. How can you use the congruences stated in the previous hint to rewrite the sum into some-
thing more manageable, something without the floor function?

5. Prove 2n − 1 has a prime divisor of the form 3 (mod 4).

6. You’ve probably tried modulo 3 already, and it’s failed. What else can you try?

7. When p 6= 29, 29p + 1 ≡ 30 (mod p).

8. Do there exist any solutions when none of p, q, or r equal 2?

9. The number 1989 is quite big...maybe we can break it into smaller parts?
(
10321032 (mod 4)
10. Calculuate then use the Chinese Remainder Theorem to finish.
10321032 (mod 25)

11. Solve the problem for a 1 × 100 grid with Chinese Remainder Theorem. Generalize this
method to a 2 × 100 grid and so forth.
(
f (x) (mod 4)
12. Calculuate Some of them are a bit tricky but all can be done using Euler’s
f (x) (mod 25)
Totient Theorem.

13. Take mod 13.

14. Let q be a prime such that q | 2p − 1. Therefore ordq (2) | p.

15. This is the final problem in the packet; there are no hints. Good luck! (Yes, we’re evil.)

16. Use the fact that


 
n n! n(n − 1)(n − 2)(n − 3)(n − 4)(n − 5)(n − 6)
= = .
7 (n − 7)!7! 7!

Also, the Pigeonhole Principle is your friend here.

17. Let (
n ≡ −a (mod p),
n ≡ 1 (mod p − 1).
Olympiad Number Theory Justin Stevens, David Altizio Page 7

18. The answer is 1. To prove that every prime p divides into at least one term of the sequence
let n = p − 2.
(
200511 + 200512 + · · · 20052006 (mod 125)
19. Calculuate then use the Chinese Remainder
200511 + 200512 + · · · + 20052006 (mod 8)
Theorem to finish.

20. For each positive integer n, consider the sequence of positive integers {bi } such that b1 is the
largest odd number that divides n and for each i ≥ 1, bi+1 is the largest odd number that
evenly divides φ(bi ). Show that this sequence must at some point remain constant at 1, and
use this to your advantage.

21. Find all possible values of x mod 7, mod 11 and mod 13 and make a chart of these values.
This relates to a certain number of solutions mod 1001. Consider the sets

{1, 2, · · · , 1001}, {1002, · · · , 2002}, · · · , {9009, · · · , 10010}

and count the total number of solutions here. Be careful: we are looking for solutions less
than 10000.

22. We don’t quite know how to work with floor functions. However, we do know that
(
22x ≡ 1 (mod 3)
22x+1 ≡ 2 (mod 3).

Work with that!

23. (a) p = 37
(b) p = 17

24. There was a very similar problem to this in the CRT section. Find it.
2001 2001
25. This one is computational heavy. Calculuate 32002 (mod 125) and 32002 (mod 8). The
second one can be found using Euler’s Totient. For the second one you must find 20022001
2001
(mod φ(125)) and then use quite a bit of computations to find 32002 (mod 125).

26. Take mod 19 and add the two equations.

27. We must have ord1001 (10) | i − j.

28. ordp (a) = 2n+1


2006···
29. To calculuate 20082007 (mod 125) we want to find 2007··· (mod φ(125)).

30. Take mod 11.

31. Let p be the smallest prime divisor of n. Find something smaller that divides n and gives a
contradiction.

32. Consider the set {(2n + 2)! + 2, (2n + 2)! + 3, · · · , (2n + 2)! + n + 1}
Olympiad Number Theory Justin Stevens, David Altizio Page 8

n n
33. Let q | a2 + b2 and z ≡ ab−1 (mod q). Consider ordq (z).

34. Factorials are annoying, but you can restrict on the possible values of y by taking the equation
to a certain mod.

35. Note that this is equivalent to proving that vp (m) = vp (n) where p 6= 11 is a prime.
n−2
36. (a) Notice that (x, y) = (1, 1) is
 a trivial
 solution. Prove that ord3n 7 = 3 . To do so use
i
induction to prove that v3 73 − 1 = i + 1. Go on to use this lemma to prove x ≡ 8
(mod 9). Try to find a p such that ordp (7) = 9 in order to make 7x constant mod p.
n−2
(b) We have (x, y) = (3, 1) is a trivial
 solution. Again prove that ord2n 11 = 2 by using
i
induction to prove v2 112 − 1 = i + 2. Now use this to prove that y ≡ 7 (mod 8).
Go on to find a p such that ordp (2) = 8.

37. Make a table for f (1), f (2), · · · , f (9) (mod 9) and f (1), f (2), · · · , f (9) (mod 6). Figure out
how these tables work together. (This was my main inspiration for the whole problem.)

38. Prove that x3 6≡ y 3 (mod p) when x 6≡ y (mod p). How does this help you?

39. Let z ≡ ab−1 (mod m). Then we have z x ≡ 1 (mod m) =⇒ ordm (z) | x.

40. Notice that 2j − 1 ≡ 0 (mod i) looks a lot like Euler’s Totient.

41. Prove that if we can find a set of size N then we can find a set of size N + 1. To do so
consider all prime divisors of all elements of the set with size N .

42. Set ordan −1 (a) = x. Therefore ax − 1 ≡ 0 (mod an − 1). Anything jump out to you?
 jnk 
43. Prove that vp (n!) = vp lcm {1, 2, . . . , } using Legendre’s formula.
i
44. Use one of the problems above.
n−1
Y
45. Consider the number of times that a prime p divides into n! and (2n − 2k ). For p = 2
k=0
n−1
Y
there are more factors of 2 in (2n − 2k ) than in n!. When p 6= 2 we must use Legendre’s
k=0
∞  
X n
Theorem which states that the number of times that p divides into n! is . Develop
i=1
pi
n−1
Y
something similar for (2n − 2k ) by using Euler’s Totient and finish the problem.
k=0

46. Because φ(49) = 42 we have a83 = 683 + 883 ≡ 6−1 + 8−1 (mod 49)

47. Consider the cases p | 5p − 2p and p | 5q − 2q . Let z ≡ 5 · 2−1 (mod p) and use order.
Olympiad Number Theory Justin Stevens, David Altizio Page 9

References
[1] Burton, David M. Elementary Number Theory. Boston: Allyn and Bacon, 1976. Print.

[2] http://yufeizhao.com/olympiad/mod2.pdf

[3] http://www.artofproblemsolving.com/Wiki/index.php/Fermat_number

[4] ”104 Number Theory Problems: From the Training of the USA IMO Team [Paperback].”
Amazon.com: 104 Number Theory Problems: From the Training of the USA IMO Team
(9780817645274): Titu Andreescu, Dorin Andrica, Zuming Feng: Books. N.p., n.d. Web. 01
Aug. 2013.

[5] http://www.math-olympiad.com/35th-canadian-mathematical-olympiad-2003.htm#2

[6] http://www.artofproblemsolving.com/Forum/viewtopic.php?f=721&t=542072

[7] http://www.artofproblemsolving.com/Forum/viewtopic.php?t=42703

[8] Andreescu, Titu, and D. Andrica. Number Theory: Structures, Examples, and Problems.
Boston, MA: Birkhuser, 2009. Print.

[9] http://www.artofproblemsolving.com/School/courseinfo.php?course_id=
intermediate:numbertheory

[10] http://www.artofproblemsolving.com/Wiki/index.php/2005_USAMO_Problems/
Problem_2

You might also like