Number Theory

Download as pdf or txt
Download as pdf or txt
You are on page 1of 6

Olympiad Assignment-I

Course : RMO

Number Theory

Divisibility
For integers a and b, we say that a divides b, or that a is a divisor (or
factor) of b, or that b is a multiple of a, if there exists an integer c such that b =ca, and we denote this by
a | b. Otherwise, a does not divide b, and
we denote this by a b. A positive integer p is a prime if the only divisors of
p are 1 and p. If pk | a and pk+1 | a where p is a prime, i.e. pk is the highest
power of p dividing a, then we denote this by pk || a.
Useful Facts
• If a, b > 0, and a | b, then a ≤ b.

• If a | b1 a | b2, . . . , a | bn, then for any integers c1, c2, . . . , cn,


n
a| b c
i1
i i

Theorem 1.1. The Division Algorithm. For any positive integer a and integer b, there exist unique integers q
and r such that b = qa + r and 0 ≤ r < a, with r = 0 iff a | b.

Theorem 1.2. The Fundamental Theorem of Arithmetic. Every integer greater than 1 can be written uniquely in
the form p1e1 p e22 .....p kek
where the pi are distinct primes and the ei are positive integers.
Theorem 1.3. (Euclid) There exist an infinite number of primes.

Proof. Suppose that there are a finite number of primes, say p1, p2, . . . , pn. let N = p1 p2 · · ·pn+1
By the fundamental theorem of arithmetic, N is divisible by some prime p. This prime p must be among the pi,
since by assumption these are all the primes, but N is seen not to be divisible by any of the pi contradiction.
Useful Facts
• Bertrand’s Postulate. For every positive integer n, there exists a prime p such that
n ≤ p ≤ 2n.
• Gauss’s Lemma. If a polynomial with integer coefficients factors into two polynomials with
rational coefficients, then it factors into two poly- nomials with integer coefficients.
Problems

Let a, b, and c denote three distinct integers, and let P denote a poly- nomial having all integral
coefficients. Show that it is impossible that P (a) = b, P (b) = c, and P (c) = a.

2 GCD and LCM


The greatest common divisor of two positive integers a and b is the great- est positive integer that divides
both a and b, which we denote by gcd(a, b), and similarly, the lowest common multiple of a and b is the
least positive say that a and b are relatively prime if gcd(a, b) = 1. For integers a1, a2, . . . , an, gcd(a1, a2, .
. . , an) is the greatest positive integer that divides all of a1, a1, . . . , an, and lcm(a1, a2, . . . , an) is defined
similarly.

92, Rajeev Gandhi Nagar, Kota (Raj.) Mob. 97831-97831, 70732-22177 1


www. nucleuseducation.in
NUMBER THEORY
Useful Facts
• For all a, b, gcd(a, b) · lcm(a, b) = ab.

• For all a, b, and m, gcd(ma, mb) = m gcd(a, b) and lcm(ma, mb) = mlcm(a, b).

• If d | gcd(a, b), then

 a b  gcd(a, b)
gcd ,  
 d d d
In particular, if d = gcd(a, b), then gcd(a/d, b/d) = 1; that is, a/d and b/d are relatively prime.
• If a | bc and gcd(a, c) = 1, then a | b.

• For positive integers a and b, if d is a positive integer such that d | a,


d | b, and for any d' , d' | a and d' | b implies that d' |d, then d = gce (a,b). This is meraly the
assertion that any common divisor of a and b divides gcd (a, b)
• If a1 a2 · · ·an is a perfect kth power and the ai are pairwise relatively prime, then each
th
ai is a perfect k power.
• Any two consecutive integers are relatively prime.

Proof. Let S be the set of all integers of the form ax+by, and let d be the least positive element of S. By the
division algorithm, there exist integers q
and r such that a = qd + r, 0 ≤ r < d. Then r = a ­ qd = a ­ q(ax + by) = (1 ­ qx)a ­ (qy)b, so r is
also in S. But r < d, so r = 0 ⇒ d | a, and similarly, d | b, so d | gcd(a, b). However, gcd(a, b) divides all
elements of S, so in particular gcd(a,b) |d ⇒ d = gcd(a,b). The second part of the theorem
follows.

Corollary 2.1. The positive integers a and b are relatively prime iff there exist integers x and y such that ax
+ by = 1.
Corollary 2.2. For any positive integers a1, a2, . . . , an, there exist integers x1, x2, . . . , xn, such that a1 x
+ a2x2 +· · ·+an xn = gcd(a1, a2, . . . , an).
Corollary 2.3. Let a and b be positive integers, and let n be an integer. Then the equation
ax + by = n
has a solution in integers x and y iff gcd(a,b) | n. If this is the case, then all solutions are of the form

x, y    x 0  t. d , a
y 0  t. 
 d d
where d = gcd(a, b), (x0, y0) is a specific solution of ax + by = n, and t is an integer.

Proof. The first part follows from Theorem 2.1. For the second part, as stated, let
d = gcd(a, b), and let (x0, y0) be a specific solution of ax + by = n,
So that ax0 + by0 = n. If ax + by = n, then ax + by ­ ax0 ­ by0 = a(x ­ x0) + b(y ­ y0) = 0, or a(x ­ x0) =

b(y0 ­ y), and hence x  x 0 . a  y 0  y . b


d d
Since a/d and b/d are relatively prime, b/d must divide x ­ x0, and a/d must divide y0 ­ y. Let x ­ x0 =
tb/d and y0 ­ y = ta/d. This gives the solutions
described above.

92, Rajeev Gandhi Nagar, Kota (Raj.) Mob. 97831-97831, 70732-22177 2


www. nucleuseducation.in
NUMBER THEORY
Remark. It immediately follows from this result that there are an infinite number of
primes.
The Euclidean Algorithm. By recursive use of the division algorithm, we may find the gcd of
two positive integers a and b without factoring either, and the x and y in Theorem 2.1 (and
so, a specific solution in Corollary 2.4). For example, for a = 329 and b = 182, we compute

329 = 1 · 182 + 147,


182 = 1 · 147 + 35,
147 = 4 · 35 + 7,
35 = 5 · 7,
and stop when there is no remainder. The last dividend is the gcd, so in our example,
gcd(329,182) = 7. Now, working through the above equations
backwards,
7 = 147 ­ 4 · 35 = 147 ­ 4 · (182 ­ 1 · 147)

= 5 · 147 ­ 4 · 182 = 5 · (329 ­ 182) ­ 4 · 182 = 5 · 329 ­ 9 · 182.


Remark. The Euclidean algorithm also works for polynomials.

3 Arithmetic Functions
There are several important arithmetic functions, of which three are pre-sented here. If the
prime factorization of n > 1 is p1e1 p e2 2 ......pkek , then the number of positive integers less
than n, relatively prime to n, the number of divisors of n is
 1 1   1 
n  1   1  ....1 
 
n

 p1   p 2   p k 
p1e1 1 p 2e2 1....p kek 1 p1  1p 2  1....p k  1
the number of divisors of n is
 (n) = (e1 + 1) (e2 + 1)….(ek+1),
and the sum of the divisors of n is
    
n  p1e1  p1e1 1  ....  1 p e22  p 2e2 1  ....  1 …. p ekk  p kek 1  ....  1
 p e1 1
 1   p e 2 1
 1   p ek 1  1 
=  1  2 ...... k 
 p1  1   p 2  1   p 1 
     k 
Also, (1),  (1), and σ(1) are defined to be 1. We say that a function f is multiplicative
if f (mn) = f (m) f (n) for all relatively prime positive integers m and n, and f (1) =1
(otherwise, f (1) = 0, which implies that f (n) = 0 for all n).

Theorem 3.1. The functions , τ , and σ are multiplicative.


Hence, by taking the prime factorization and evaluating at each prime power, the formula above
are found easily.

4 Modular Arithmetic
For a positive integer m and integers a and b, we say that a is congruent to b modulo m
if m | (a – b), and we denote this by a ≡ b modulo m, or more commonly a ≡ b (mod m).
Otherwise, a is not congruent to b modulo m, and we denote this by a  b (mod m)
(although this notation is not used often). In the above notation, m is called the modulus,
and we consider the integers modulo m.

92, Rajeev Gandhi Nagar, Kota (Raj.) Mob. 97831-97831, 70732-22177 3


www. nucleuseducation.in
NUMBER THEORY

Theorem 4.1. If a ≡ b and c ≡ d (mod m), then a + c ≡ b + d (mod m) and ac ≡ bd


(mod m).
Proof. If a≡b and c d (mod m), then there exist integers k and such that
a = b + km and c = d + lm. Hence, a + c = b + d + (k + )m, so
a + c ≡ b + d (mod m). Also,

ac = bd + dkm + bm + km2

= bd + (dk + bl + km)m,
so ac ≡ bd (mod m)
Useful Facts
• For all integers n,
0  if n is even,
n2   mod 4 
1
   if n is od.
• For all integers n,
0  if n  0 (mod 4)
  
n  4mod 8 if n  2 (mod 4)
2

 1  if n  1 (mod 2)
  
• If f is a polynomial with integer coefficients and a ≡ b (mod m), then
f(a) ≡ f(b) (mod m).

Theorem 4.1. The inverse of a modulo m exists and is unique iff a is relatively prime to m.
Proof. If ax ≡ 1 (mod m), then ax = 1 + km for some k ⇒ ax ­km = 1. By Corollary 2.2, a and
m are relatively prime. Now, if gcd(a, m) = 1, then by Corollary 2.2, there exist integers x and y
such that ax + my = 1 ⇒ ax = 1 ­ my ⇒ ax ≡ 1 (mod m). The inverse x is unique modulo m,
since if x is also an inverse, then ax ≡ ax ≡ 1 ⇒ xax ≡ xax ≡ x ≡ x
Corollary 4.2. If p is a prime, then the inverse of a modulo p exists and is unique iff p does not
divide a.
Corollary 4.3. If ak ≡ bk (mod m) and k is relatively prime to m, then
a ≡b (mod m).
–1
Proof. Multiplying both sides by k , which exists by Theorem 4.2, yields the result.
We say that a set {a1, a2, . . . , am} is a complete residue system modulo
m if for all i, 0 ≤ i ≤ m­1, there exists a unique j such that aj ≡ i (mod m).
Theorem 4.4. Euler’s Theorem. If a is relatively prime to m, then a(m)  1 (mod m).
Proof. Let a1, a2, . . . , a(m) be the positive integers less than m that are relatively prime to m.
Consider the integers aa1, aa2, . . . , aa(m). We claim that they are a permutation of the original (m)
integers ai, modulo m. For each i, aai is also relatively prime to m, so aai ≡ ak for some k. Since aai ≡
aaj ⇔ ai ≡ aj (mod m), each ai gets taken to a different ak under
multiplication by a, so indeed they are permuted. Hence,

a1a2 · · · a(m) ≡ (aa1)(aa2) · · · (aa(m)

92, Rajeev Gandhi Nagar, Kota (Raj.) Mob. 97831-97831, 70732-22177 4


www. nucleuseducation.in
NUMBER THEORY

 a(m)a1a2 · · · a(m)

⇒ 1 ≡ a(m) (mod m).


–1 m–2
Remark. This gives an explicit formula for the inverse of a modulo m: a ≡ a (mod m).
Alternatively, one can use the Euclidean algorithm to find a–1 ≡ x as in the proof of Theorem 4.2.

Corollary 4.5. Fermat’s Little Theorem (FLT). If p is a prime, and p


p–1 ≡ 1 (mod p).
does not divide a, then a

Remark. We immediately have that (p ­ 1)! ≡ Sp–1 ≡ ­1 (mod p), which is Wilson’s Theorem. Also,
xp ­ x ≡ 0 (mod p) for all x, yet we cannot compare coefficients here. Why not?
2
Theorem 4.6. If p is a prime and n is an integer such that p | (4n + 1), then p ≡ 1 (mod 4).
Proof. Clearly, p cannot be 2, so we need only show that p ≡ 3 (mod 4).Suppose p = 4k + 3 for some k.
p−1
Let y = 2n, so by Fermat’s Little Theorem, y ≡ 1 (mod p), since p does not divide n. But, y2 + 1 ≡ 0,
so
yp−1 ≡ y4k+2 ≡ (y2)2k+1 ≡ (­1)2k+1 ≡ ­1 (mod p),

contradiction. Therefore, p ≡ 1 (mod 4).


Remark. The same proof can be used to show that if p is a prime and
2
p|(n + 1), then p = 2 or p ≡ 1 (mod 4).

Theorem 4.7.Wilson’s Theorem. If p is a prime, then (p ­ 1)! ≡ ­1 (mod p). (See also Example 4.5.)

Proof. Consider the congruence x ≡ 1 (mod p). Then x ­1≡(x­1)(x +1)≡0, so the only solutions are x ≡
2 2

1 and ­1. Therefore, for each i, 2 ≤ i ≤ p ­ 2, there exists a unique inverse


j  i of i, 2 ≤ j ≤ p ­ 2, modulo p. Hence, when we group in pairs of inverses,

(p ­ 1)! ≡ 1 · 2 · · · (p ­ 2)·(p ­ 1)
≡ 1 · 1 · · · 1 · (p ­ 1)
≡ ­1 (mod p).

EXERCISE
2 2
1. Find all positive integers d such that d divides both n + 1 and (n + 1) + 1 for some integer n.

2. Prove that there are infinitely many positive integers n such that n(n + 1) can be expressed as a sum of
two positive squares in at least two different ways. (Here a2 + b2 and b2 + a2 are considered as the same
representation.) [RMO-2006]

3. Let a, b, c be three natural numbers such that a < b < c and gcd(c – a, c – b) = 1. Suppose there exists
an integer d such that a + d, b + d, c + d form the sides of a right-angled triangle. Prove that there exist
integers, l, m such that c + d = l2 + m2. [RMO-2007]

92, Rajeev Gandhi Nagar, Kota (Raj.) Mob. 97831-97831, 70732-22177 5


www. nucleuseducation.in
NUMBER THEORY
4. Find the least possible value of a + b, where a, b are positive integers such that 11 divides a + 13b and
13 divides a + 11b. [RMO-2006,]

5. A natural number n is chosen strictly between two consecutive perfect square. The smaller of these
two squares is obtained by subtracting k from n and the larger one is obtained by adding  to n. Prove
that n – k is a perfect square. [RMO-2011]

6. Prove that for all positive integers n, 169 divides 21n2 + 89n + 44 if 13 divides n2 + 3n + 51. [RMO-2012]

1 2 3
7. Determine with proof all triples (a, b, c) of positive integers satisfying + + = 1, where a is a
a b c
prime number and a  b  c. [RMO-2012]

8. Find all triples (p, q, r) of primes such that pq = r + 1 and 2(p2 + q2) = r2 + 1. [RMO-2013]

9. Let a1, b1 , c1 be natural numbers. We define [RMO-2013]

a2 = gcd(b1, c1) , b2 = gcd(c1 , a1) , c2 = gcd(a1, b1) ,

and

a3 = lcm(b2 , c2) , b3 = lcm(c2, a2 ) , c3 = lcm(a2, b2 ) .

Show that gcd(b3, c3) = a2.

10. Let 0 < a1 < a2 < · · · < amn+1 be mn + 1 integers. Prove that you can select either m + 1 of them no
one of which divides any other, or n + 1 of them each dividing the following one.

11. For a positive integer n, let r(n) denote the sum of the remainders when n is divided by
1, 2, . . . , n respectively. Prove that r(k) = r(k ­ 1) for infinitely many positive integers k.

12. The positive integers a1, a2, . . . , an are such that each is less than 1000, and lcm
(ai, aj) > 1000 for all i, j, i = j. Show that
n
1
a
i1 i
2

13. Find all solutions to aabb = n4 − 6n3, where a and b are non-zero digits, and n is an integer

(a and b are not necessarily distinct).

92, Rajeev Gandhi Nagar, Kota (Raj.) Mob. 97831-97831, 70732-22177 6


www. nucleuseducation.in

You might also like