You are on page 1of 24

NUMBER THEORY

For IOQM Booster

STANDARD ALGEBRAIC IDENTITIES


DIVISIBILITY
In this section, whenever a word 'number' is used we would mean 'a natural number' unless specified otherwise.
Lets consider two number 'a' and 'b' such that b ≥ a. We say that 'b' is divisible by 'a', if 'b' is an integral multiple
of a i.e., 'a' is a factor of 'b'.
So, 15 is a multiple of 5 and hence 15 is divisible by 5. This is denoted by 5|15. In general, if 'b' is divisible by
'a', then we denote it by a/b
Tests of Divisibility:
Divisibility by 2

b must be divisible by 2 i.e., remainder = 0.

If the units digit of a number is 0, 2, 4, 6 or 8, then the number is divisible by 2.


For example, 2, 4, 6, 8, 10, 12, …….
Divisibility by 3 and 9

a + b must be divisible by 3 and 9 respectively i.e., remainder = 0.

If the sum of digits of a number is divisible by 3, then the number is divisible by 3)


For example, 6, 15, 81, 144, 282, ........ etc.
Also, if the sum of the digits of a number is divisible by 9, then the number itself is divisible by 9.
For example, 27, 729, 72333 etc.
Divisibility by 4

cb must be divisible by 4 i.e., remainder = 0.

A number is divisible by 4 if the number formed by its last two digits (i.e., units and tens) is divisible by 4.
For example, 24, 84, 124, 1284, 156284 etc.

Divisibility by 5

b either be 0 or 5 i.e., b must be divisible by 5 i.e., remainder = 0.

If the unit's digit of a number is 0 or 5, then the number is divisible by 5.


For example, 10, 15, 100, 125, 1025 etc.
Divisibility by 6

PW OLYMPIAD WALLAH 1
IOQM Booster
A number is divisible by 6, if it is divisible by 2 as well as 3.
For example, 72, 462, 1578, etc.
Divisibility by 8

dcb must be divisible by 8 i.e., remainder = 0.

A number is divisible by 8, if the last three digits of the given number is divisible by 8.
For example, 16, 144, 2136 etc.
Divisibility by 10

b must be 0 i.e., b must be divisible by 10 i.e., remainder = 0.

A number is divisible by 10 when its unit digit is 0.


For example, 20, 70, 110, 250, 2700 etc.
Divisibility by 11
If the difference between the sum of the digits at odd places (from the right) and the sum of the digits at even
places (from the right) of the number is either zero or divisible by 11, then the number is divisible by 11.
For example, 121, 1001, 1331 etc.

Solved Examples

Example. The number a, b, c ar the digits of a three-digit number which satisfy 49a + 7b + c = 286. What is
the three-digit number (100a + 10b + c)?
Solution 49a + 7b + c = 286
 7 (7 a + b) + c = 280 + 6
Now, 7 (7a + b) and 280 are multiple of 7.
So, (6 – c) should also be a multiple of 7 or 0.
 c = 6 (Since ‘c’ is a single–digit number).
 7 (7a + b) = 280
 7a + b = 40
 7a + b = 7 × 5 + 5
Now, 7a and 7 × 5 are multiple of 7.
So, (5 – b) should be a multiple of 7 or 0.
But ‘b’ is a single digit number.
So, 5 – b = 0 i.e., b = 5
Putting b = 5 in equation (2), we get,
a=5
 abc = 556
i.e., 100a + 10b + c = 556.

Example: Given the pair of prime numbers p and 8p² + 1, find p


Solution. As p² is always of the form 3k or 3k + 1 so 8p² + 1 is divisible by 3 when p is not divisible by 3.
 One of p and 8p² + 1 is always divisible by 3.
p=3
PW OLYMPIAD WALLAH 2
IOQM Booster
Example: Show that, for all integers ‘n’, n² + 2n + 12 is not a multiple of 121.
Solution: Given expression
S = (n² + 2n +1) + 11
i.e. s = (n +1)² + 11

Case I: If n + 1 is not a multiple of 11, then (n + 1)2 is also not a multiple of 11 and hence(n + 1)2 + 1 is not
a multiple of 11. Hence the given expression can not be a multiple of 11 2 (=121) as it is not a
multiple of 11.

Case II: If (n + 1) is a multiple of 11, then (n + 1)2 is a multiple of 112 (= 121). So, (n + 1)2 + 11 is a
multiple of 11 but not 121.
n
Example: If ‘n’ is a positive integer such that = 0. d25 d25 …. Where d is single digit in decimal base.
810
Find n.
d25 100d + 25
Solution: 0.d25 d25 …. = =
999 999
So, the given equation becomes
n 25(4d + 1)
=
810 9  3  37
n 25(4d + 1)
 =
30 37
 4d + 1 must be a multiple of 37.
Now, 37 = 1 + 4 × 9
 d = 9.
 Equation (1) becomes
n 25  (4  9 + 1)
=
30 37
n
= 25
30
 n = 750.
Example: It is known that 2 + a and 24 – b are divisible by 11. Prove that a + b is also divisible by 11
Solution: a + b = (2 + a) – (24 – b) + 22
(a + b) mod 11 = (2 + a) mod 11 − (24 – b) mod 11 + 22 mod 11
= 0 (mod 11)
⇒ 11 divides (a + b).
Example: Is there a three–digit number abc (where a  c ) such that abc − cba is a perfect square?
Solution: There is no such number.
abc − cba = a (10² – 1) + b (10 – 10) + c (1 – 10²)
= 99 (a – c) where a & c are different digits
This implies, the difference id divisible by 11 but not by 11².
Hence, the difference cannot be a perfect square.

PW OLYMPIAD WALLAH 3
IOQM Booster
Example: Is it possible to form two numbers using only the digits 2, 3, 7, 8 such that one of them is 17 times
the other?
Solution: No, it is not possible.
None of the numbers 2, 3, 7, 8 when multiplied by 7 results in one of these digits. So, we have
no favorable digit for unit place.

EUCLID’S DIVISION LEMMA


Euclid's division lemma may be stated as “Given positive integers 'a' and 'b', there exists unique integers
q and r satisfying a = bq + r, 0 ≤ r < b.’’
For solving problems on number theory, this lemma is often used.
Based on Euclid's division lemma, the following important results can be proved.
(i) The square of an integer is of the form 4k or 4k + 1 type, where k is some non–negative integer. For e.g.
62 = 36 = 4 × 9, 72 = 49 = 4 × 12 + 1, 82 = 64 = 4 × 16, 92 = 81 = 4 × 20 + 1 etc.
(ii) If 'p' is a prime number such that p > 3, then ‘p’ is of the form 6k – 1 or 6k + 1, where ‘k’ is some
positive integer. For example:
5 = 6 × 1 –1, 7 = 6 × 1 + 1, 11 = 6 × 2 –1, 13 = 6 × 2 + 1, 17 = 6 × 3 – 1, 19 = 6 × 3 + 1 etc.

Solved Examples

Example: Find the G.C.D. of 250 – 1 and 260 – 1.


Solution: gcd (250 – 1, 260 – 1)
  250 − 1  10  2 60 − 1  
= gcd  (210 − 1)  10  , (2 − 1)  10 
  2 −1   2 −1  
= gcd ((210 – l) (l + 210 + 220 + 230 + 240), (210 –l) (l + 210 + 220 + 230 + 240 +250))
= gcd ((210 – l) (l + 210 + 220 + 230 + 240), (210 –l) (l + 250))
= gcd ((210–1) (some odd number), (210 – 1) (some even number))
= (210 –1) = 1023
Example: Find the G.C.D. of the numbers 2n + 7 and n + 4.
Solution: We have gcd (2n + 7, n + 4) = gcd (n + 4, n + 3)
= gcd (n + 3, 1) = 1

Example: Show that there are no integers a, b, c for which a2 + b2 – 8c = 6.


Solution a2 + b2 = 8c + 6 = 4 (2c + 1) + 2
So, a2 + b2 is of 4k + 2 type.
But the square of an integer is either of 4k type or (4k + 1) type. So, a2 + b2 = 4k + 2 type
only if each of them is of 4k + 1 type i.e., 'a' and 'b' are both odd, if possible.
Let a = 2p + 1, b = 2q + 1, where 'p' and 'q' are some integers.
So, the given equation becomes,
(2p + 1)2 + (2q + 1)2 = 8c + 6
 4p2 + 4p + 4g2 + 4q = 8c + 4
 p2 + p + q2 + q = 2c + 1
 p (p + 1) + q(q + 1) = 2c + 1
But p (p + 1) and q (q + 1) are both even as the product of two consecutive integers is
always even. But 2c + 1 is odd. So, the given equation can not be true.
So, the given equation has no solution.
PW OLYMPIAD WALLAH 4
IOQM Booster
CONGRUENCE MODULO
Congruences are an important and useful tool for the study of divisibility. Consider positive integers a, b
and n. If a – b is divisible by n, then a = nk + b, where k is some integer i.e., b is the remainder when a is
divided by n. This can be expressed as a = b (mod n).
This is read as "a is congruent to b modulo (or mod) n" It simply means that when a is divided by n, the
remainder is b.
For example, 2016 = 1 (mod 5) and 1999 = 3 (mod 4)
Important properties of congruence
(a) If a  b (mod n), then b  a (mod n)
Proof: a  b (mod n)
 (a – b) is divisible by n
 (b– a) is divisible by n
 b  a (mod n)
(b) If a  b (mod n) and b  c (mod n), then a  c (mod n)
Proof: a  b (mod n)
 (a – b) is divisible by n …(i)
b  c (mod n)
 (b – c) is divisible by n ... (ii)
From (i) and (ii), we have,
[(a – b) + (b – c)] is divisible by n
 (ac) is divisible by n
 a  c (mod n)
(c) If a  b (mod n) and c  d (mod n), then (a + c)  (b + d) (mod n)
Proof: a  b (mod n)
 (a – b) is divisible by n …(i)
c  d (mod n)
 (c –d) is divisible by n …(ii)
From (i) and (ii), we have,
[(a–b) + (c–d)] is divisible by n
 (a + c) – (b + d) is divisible by n
 (a + c)  (b + d) (mod n)
(d) If a  b (mod n) and c  d (mod n), then ac bd (mod n)
Proof: a  b (mod n)
 (a – b) is divisible by n
 a – b = k1n …(i)
(Where k1 is some integer)
Again c  d (mod n)
 (c – d) is divisible by n
 c – d = k2n …(ii)
(Where k2 is some integer)

PW OLYMPIAD WALLAH 5
IOQM Booster
From (i) and (ii), we have,
ax = [b + k1n] [d + k2n]
 ac = bd + bk2n + k1nd + k1k2n2
 ac – bd = n [bk2 + dk1 + nk1k2]
 (ac – bd) is multiple of n
 ac  bd (mod n)

Solved Examples
Example: What is the remainder when 91990 is divided by 11?
Solution 91990 = 32 ×1990 = (35)796 = (243)796
Now, 243 = 11 x 22 + 1243 = 1 (mod 11)
 243796 = 1796 (mod 11)
 91990 = 1 (mod 11)
So, when 91990 is divided by 11, then the remainder is 1

Example: Prove that 3095 + 6196 is divisible by 31.


Solution: 3095  (–1 )95  (–1) mod 31
6196 = (1)96 = (1) mod 31
 (3095 + 6196) mod 31  (3095 mod 31) + (6196 mod 31)
 –1 + 1 = 0 (mod 31)
 3095 + 6196 is divisible by 31.

Example: Prove that the difference between a number with oddly many digits and the number written with
the same digits in reverse order is divisible by 99.
Solution: Let the number be a1 a2 a3 ……… a2n+1 = N
Its reverse, R = a2n+1 a2n ….. a1
N– (a1 + a2 + …..+ a2n+1)  0 (mod 9)
S – (a1 + a2 + …..+ a2n+1)  0 (mod 9)
 (N –S)  0 (mod 9)
 (N – S) is divisible by 9 …(1)
As 10  (–1) (mod 11) we have
n n

N (mod 11)  a1 –a2 + a3–a4 + …. + a2n+1 and


S (mod 11)  a2n+1 –a2n + a2n–1 …. a2+ a1
 (N–S)  0 (mod 11)
 (N–S) is divisible by 11 …(2)
(1) and (2) gives the number is divisible by 99.
Example: Find the remainder when 32000 is divided by 13.
Solution: 32000 = 33×666 + 2 = (33)666 × 32
 32000 = (26 + 1)666 × 9
Now, 27  1 (mod 13)
 27666  1666(mod 13)  1 (mod 13)
 27666 × 9  1 × 9 (mod 13)
 32000  9 (mod 13)
So, when 32000 is divided by 13, the remainder is 9.
PW OLYMPIAD WALLAH 6
IOQM Booster
Example: Does there exist an integer such that its cube is equal to 3n2 + 3n + 7, where n is integer?
Solution: Suppose there exist integers n and m such that
m3 = 3n2 + 3n + 7
 m3  1 (mod 3)
 m  1 (mod 3)  m  3k + 1, k  z
Original equation becomes
(3k + 1)3 = 3n2 + 3n + 7
 27k3 + 27k2 + 9k + 1 = 3n2 + 3n + 7
 3k (3k2 + 3k + 1) = n2 + n + 2 = n (n + 1) + 1
As LHS is divisible by 3 but RHS is not, there is no integer satisfying the condition of the question.

Example: Prove that 131 + 231 + ….. + (n – 1)n is divisible by n.


Solution: For any odd n, 1n + 2n + …. + (n – 1)n is divisible by n.
Proof follows:
Consider the remainder of kn and (n – k)n when divided by n.
(n – k)n mod n  (–k)n mod n  –(kn) mod n. (as n is odd)
 kn + (n – k)n  kn – kn (mod n)
0
 The sum of kn and (n – k)n is divisible by n.
i.e., 1n + (n – 1)n is divisible by n, 2n + (n –2)n is divisible by n, ….. so on.
Hence, 1n + 2n + ….+ (n – 1)n is divisible by n when n is odd.

Example: Find the number of perfect squares in the sequence.


11, 111, 1111, 11111, 111111, …..
Solution: All the numbers in the given sequence is of the form 3 (mod4) i.e., 4k + 3 type. But the square of
any integer is either 0 (mod 4) i.e., 4k type of 1 (mod 4) i.e., 4k + 1 type. So, no number in the
sequence is a perfect square.

Example: The number 82019 is written on a blackboard. The sum of its digits is calculated, then the sum of the
digits of the result is calculated and so on, until we get a single digit. What is this single digit?
Solution: The answer is 8.
Since the remainders of a natural number and of the sum of its digits when divided by 9
are the same, the remainder of 82019 coincides with the remainder of the final result x.
x  82019 mod 9  (–1 )2019 = –1 mod 9 = 8
Since, x is a single digit  x = 8
7
Example: Find the last digit of the number 7 7 .
Solution: As 74 has its last digit 1, the unit digit of 7n has cycle of length 4.
So, we need to find remainder when 77 is divided by 4 first.
77 mod 4  (–1)7 mod 4  –1 mod 4  3

Example: Find the remainder when 22005 is divided by 13.


Solution: 26 = 64  (–1) (mod 13)
Now, 22005 = 26×334+1 = (26)334 × 21
So, (26)334  (–1)334 (mod 13)
(26)334  1 (mod 13)
 (26)334 ×21  2 (mod 13)
 22005  2 (mod 13)
So, when 22005 is divided by 13, the remainder is 2.

PW OLYMPIAD WALLAH 7
IOQM Booster
Example: A three–digit number was decreased by the sum of its digits. Then the same operation was carrier
out with the resulting number, etc. 100 times in all. Find the final number.
Solution: After the first subtraction the result is divisible by 9. Hence, all the numbers we obtain in the
rocess has the sum of their digits not less than 9 (unless the number is reduced to zero). If the
original number is not greater than 891 = 9 × 99, then in 100 operations, we have result as zero.
If the number is greater than 891 then after at most 6 operations (in case of 999), we
obtain the number 891 and after 5 operations on 891, we obtain 801 = 9 × 89.
So after at most 5 + 6 + 89 = 100 operations, we have zero as the final result.
The final number is 0.

Example: Seven natural numbers are such that the sum of any six of them is divisible by 5. Prove that each of
these numbers is divisible by 5.
Solution: Let x1, x2, ….., x7 be the seven numbers
Consider, s1 = x2 + x3 + x4 + x5 + x6 +x7
and s1 = x1 + x3 + x4 + x5 + x6 +x7
As per given condition s1  s2  0 (mod 5)
 s1 – s2  0 (mod 5)
 (x2 – x1)  0 (mod 5)
 x1  x2 mod 5
Repeating the above steps, we have
x1  x2  x3  ……..  x7 (mod 5)
That means all the seven numbers give same remainder when divided by 5 and sum of
any six of them is completely divisible by 5.
Let xi = 5ki + r,i = 1, 2, 3, …. 7, 0 ≤ r < 5
as 5 | S1
 5 | 5(k2 + k3 +…..+ k7) + 6r  5 | 6r  5 | r  r = 0
Hence, each of the number is divisible by 5.

Example: Find the last two digits of 777.


Solution: 71 = 7; 72 = 49; 73 = 343 ; 74 = 2401
 74  01 (mod 100) …(i)
Now, 777 = 74×19+1 = (74)19 × 71
So, 74  1 (mod 100)
 (74)19  119 (mod 100)
 776  1 (mod 100)
 776 ×71  71 (mod 100)
 777  7 (mod 100)
So, the last two digits of 777 is 07.

PW OLYMPIAD WALLAH 8
IOQM Booster
FERMAT’S LITTLE THEOREM
For ‘a’ relatively prime to ‘p’ we have ap–1  1 (mod p)
Corollary : Let p be a prime number. Then for any integer ‘a’ we have ap  a (mod p)

Example: Find the value (s) of prime number(s) p such that 29p + 1 is a multiple of p.
Solution: 29p + 1  1 (mod 29)
 29 doesn’t divide 29p +1  p can’t be 29.
 p and 29 are relatively prime.
Hence, by Fermat’s little theorem,
29p–1  1 (mod p)  29p  29 (mod p)
 29p +1  1 (mod p)  29p  29 (mod p)
 29p + 1  30 (mod p)  0 (mod p) [as per the question]
 p divides 30
 p = 2, 3 or 5.

Example: Find remainder when 33 divides 298


Solution: From Fermat’s little theorem, 22  1 (mod 3) and 210  1 (mod 11)
298  (22)49  (1)49  1 (mod 3) … (1)
298  (210)9 (28)  28  256  3 (mod 11) ...(2)
(1) and (2)
 298 = 3k + 1 = 11m + 3
Take (modulo 3) on both sides
1  2m (mod 3)
 m  2 (mod 3)  m = 3n + 2
 298 = 11m + 3 = 11 (3n + 2) + 3
= 33n + 25
 298 (mod 33) = (33n + 25) mod 33 = 25
Hence, the required remainder is 25.

WILSON’S THEOREM
For all prime p > 2, we have (p – 1)

Solved Examples

Example: Find the remainder when 97! is divided by 101.


Solution: From Wilson’s theorem, 1001  –1 (mod 101)
 100 × 99 × 98 × 97!  –1 (mod 101) ...(1)
Also, 100  –1 (mod 101), 99  –2 (mod 101), 98  –3 (mod 101)
 (1)  (–1) (–2) (–3) (97!)  –1 (mod 101)  6 × (97!)  1 (mod 101)
Let 97!  k (mod 101) then 6k  1 (mod 101)  k = 17
 Remainder = 17

PW OLYMPIAD WALLAH 9
IOQM Booster
Example: Find the remainder when 30! Is divided by 899.
Solution: 899 = 29 x 31
30! = 30 × 29 × 28!  0 (mod 29) ...(1)
From Wilson's theorem, 30!  –1 (mod 31) ...(2)
(1) and (2)  30! = 29k = 31m – 1
take modulo 29 to get
0  (2m – 1) mod 29
  2m  1 (mod 29)
 m  29n + 15
 30! = 31m – 1 = 31 × 29n + 31 × 15 – 1
= 899n + 464
 30!  899n + 464  464 (mod 899)
 The required remainder is 464.

CHINESE REMAINDER THEOREM


Let n1, n2, ….., n r  N be pairwise relatively prime, For any a1, a2,…., a r  Z the solution set of the system of
simultaneous congruences
x  a 1 (mod n 1 )
x  a 2 (mod n 2 )

x  a r (mod n r )
Consists of unique congruences class modulo N = n1n2…nr
OR
Chinese remainder theorem states that these always exist an ‘x’ that satisfies the given congruences
x  rem[0](mod num [0])
x  rem[1](mod num [1])
.....
and ( num [0] , num [1]...num [m − 1] ) all must be coprime to the another.
Hints:
Explain Chinese Remainder theorem
If x  a1 (mod m1)
x  a2 (mod m2)
x  a3 (mod m3)
(i) gcd (m1, m2) = gcd (m2,m3) = gcd (m2, m1) = 1 i.e., all coprime
(ii) x = (M1X1a1 + M2X2a2 + M3X3a3 + … + MnXnan) mod M
M = m1 × m2 × m3 ……mn
M M m1 m 2 m 3
Mi = e.g, M1 = = = m 2m3
Mi m1 m1
 M1 = m2m3
M2 = m1m3
M3 = m2m1
(iii) To calculate Xi : MiXi  1 mod mi

PW OLYMPIAD WALLAH 10
IOQM Booster
EQUATINS IN INTEGERS
In this section we shall learn, through examples, different ways to solve the equation(s) in which
variables can take only integer values. Sometimes an appropriate transformation of the equation can be of
help. In some instances, remainders modulo some natural number would also be considered. Inequalities
and estimate may also come handy in solving some of the equations in integers.

Solved Examples

1 1 1
Example: Solve + +
= 1 for integer values of a, b and c.
a b c
Solution: If all of a, b, c are positive then either all of them are equal to 3 or at least one of them is less than
3.
(a, b, c) = (3, 3, 3) is a solution.
1 1 1
When a = 2, + =  (b, c) = (4, 4)  (a, b, c) = (2, 4, 4)
b c 2
1 1
If one of the numbers – say a – is negative, then +  1  either b or c is 1.
b c
 b = 1  a = –c
 Solution are (a, b, c) = (3, 3, 3), (2, 4, 4), (1, x, –x), (x, 1, –x), (x, –x, 1) where x is
arbitrary non–zero integers.

Example: Solve x² + y² = x + y + 2 for integer values of x and y


Solution: We have x (x – 1) + y (y –1) = 2 … (1)
As t (t – 1) > 2 if t > 2 or t < –1 we have possibilities of x and y as 2, 1, 0, –1
When x = 2, y = 0 or 1
When x = 1, y = 2 or –1
When x = 0, y = 2 or –1
When x = –1, y = 0 or 1
 (x, y) = (2, 0), (2, 1), (1, 2), (1, –1), (0, 2), (0, –1), (1, 0), (–1, 1)

Example: Prove that there are no natural numbers a and b such that 2a2 – 3b2 = 7.
Solution: Take modulo 3 on both sides.
LHS = (2a2 – 3b2) mod 3 = 2a2 mod 3 = 0 or 2
RHS = 7 (mod 3)  1
Hence, 2a2 – 3b2 – 7 has no natural number solution.

Example: Solve x³ + 3 = 4y (y + 1) for integer values of x and y.


Solution: We have x³ = 4y² + 4y – 3
 x³ = (2y – 1) (2y + 3)
As (2y –1) and (2y + 3) are relatively prime, for (2y – 1) (2y + 3)
to be cube of an integer, 2y + 3
 no pair of (x, y) exists.

Example Find all pairs of integers ‘a’ and ‘b’ for which 7a + 14b = 5a² + 5ab + 5b².
Solution: Consider this equation as quadratic in b.
5b² + (5a – 14) b + 5a² – 7a = 0
Its discriminant should be greater than or equal to zero.
 (5a – 14)2 – 20 (5a² – 7a) = 0

PW OLYMPIAD WALLAH 11
IOQM Booster
Its discriminant should be greater than or equal to zero.
 (5a – 14)² – 20 (5a² – 7a) ≥ 0
 75a² ≤ 196
 –1 ≤ a ≤ 1
Put a = –1,0, 1 in original equation to get b = 3,0,2 respectively.
 (a, b) = (–, 3), (0, 0), (1, 2)

Example: Given natural numbers x, y and z such that x2 + y2 = z2, prove that xy is divisible by 12.
Solution: If neither of the numbers x or y is divisible by 3, then z2 gives a remainder of 2 when divided by 3.
If neither of the numbers x or y is divisible by 3, then z2 gives a remainder of 2 when
divided by 3.
which is impossible.  One of x or y is divisible by 3. Both the numbers x and y cannot
be odd as the square of an odd number always gives remainder 1 when divided by 8
while square of an even number (for RHS) when divided by 8 gives remainder 0 or 4. On
dividing by 8, square of an even number not divisible by 4 has remainder 4, and the
square of a multiple of 4 has remainder 0.
If one of x & y is even and other is odd, RHS is odd. Implying z2 (mod 8) = 1 and x2
(mod 8) = 1  y2 (mod 8)  0
 If x is odd then y has to be a multiple of 4.
If both of x & y is even then also xy is divisible by 4 and 3 i.e., by 12.

Example: Solve x² + y² + z² = 8t – 1 for integer values of x, y, z and t.


Solution: x can be 8k, 8k ± 2, 8k ± 3, or 8k ± 4
 x² can be 8k, 8k + 1 or 8k + 4
That is any of x², y² or z² when divided by 8 leaves remainder 0, 1 or 4.
Hence, (x² + y² + z²)  012345 or 6 (mod 8)
While 8t – 1  –1  7 (mod 8)
 Hence no such solution exists.

Example: Solve x2 = 14 + y2 for Integer values of x and y.


Solution: x² – y² = 14
 (x – y) (x + y) = 14
As both the factors of LHS is of same parity, either the LHS is odd or an even number
divisible by 4 Bui Ihe number 14 of RHS belongs to neither of two.
 There is no integral solution

Example: If p(x) denotes the product of digits of x then find all positive integers x for which p(x) = x² – 10x
– 22.
Solution: As p(x) ≤ x for all x  N , we have x² – 10x – 22 ≤ x
 x (x – 10) – 22 ≤ x
 x ≤ 12 …. (1)
From (1) and (2), x = 12 can be the only solution.
One can directly check that x = 12 is indeed a solution.

Example: Solve xy = x + y + 3 for integer values of x and y.


Solution: xy – x – y = 3
 (x – 1) (y –1) = 4 = 1 × 4 or 4 × 1 or 2 × 2 or – 1 × – 4 or – 4 or – 4 × – 1 or – 2 × – 2
 (x, y) = (2, 5), (5, 2), (3, 3), (0, –3), (–3, 0), (–1, – 1)

PW OLYMPIAD WALLAH 12
IOQM Booster
NUMBER BASES
In a base 'b' number system (where ‘b’ is a natural number greater than 1), b digits corresponding to the
first b integers starting from zero are used. The symbol in the last position of the representation of a
number in base b. has its own value and as It moves to the left Its value Is multiplied by b. For example,
in the decimal system (base 10), the numeral 3247 means (3 × 103) + (2 × 102) + (4 ×101) + (7× 100).
In general, If b is the base then the number an an–1 a an–2 ao = an bn + an–1 + an–2 bn–2 + ….+ a0b0
Some limes, the base is added in subscript to the right of the number to discard ambiguity.
For example, (3247)8 = 3 × 83 + 2× 82 + 4 × 8 + 7 = (1703)10
Fractions are also represented by dividing the digits in two groups by a dot.
For example, (10.11)2 = 1 x 21 + 0 x 20 + 1 × 2–1 + 1 × 2–2 = (2.75)10
In general,
n 
(a n a n −1 .....a 1a 0 .c1c 2 c 3 .....) b =  a k b k +  c k b −1k
k =0 k =1

Note: In a base 'b' system the representation of a number ends with zero if and only if this number is divisible
by 'b'.

Solved Examples

Example: Prove that from the set 0, 1, 2,….,3k–1 one can choose 2k numbers so that none of them can be
represented as the arithmetic mean of some pair of the chosen numbers.
Solution: We will use the base 3 system. Let us assume that the base 3 representation of any of the given
numbers contains exactly k digits if there are fewer than k, then we just fill the rest of the places
with zeros. Now we choose those numbers whose base 3 representation contain only 0's and 1’s.
There are exactly 2k of them we show that this can serve as the required subset. Suppose that there
were three different numbers in the subset – say x, y and z – satisfying x + y = 2z. Since the
numbers x and y must differ In at least one digit, we could then find the right most such digit. The
corresponding digit of their sum x + y would be 1. But the base 3 representation of 2z contains
only 0’s and 2's, this is a contradiction.

Example: In a number system with base ‘b’, 4 × 5 =18. Find b.


Solution: Digits 4 and 5 of base b always represent
4 × b0 = 410 and 5 × b0 = 510.
Hence, the value of LHS in base 10 is 20.
RHS = 18b = 1 × b + 8 = 20  b = 12

Example: Convert the number 25210 to the base 8 (octal) system.


Solution: 252 = 31 × 8 + 4
31 = 3 × 8 + 7
3= 0 × 8 + 3
Thus, 25210 = 3748

Example: Does there exist a number system where the following equalities hold simultaneously: 2 + 3 = 5
and 2 × 3 = 11?
Solution: 2b × 3b = 11b
 210 × 310 = 11b  610 = 1 × b + 1  b = 5
but in base 5, the digits from 0 to 4 are allowed. Then 2 + 3 = 5 doesn’t hold.
 There is no such number system.

PW OLYMPIAD WALLAH 13
IOQM Booster
FLOOR FUNCTION
Carl F Gauss introduced the bracket notation in 1808. He used the symbol [x] to denote the greatest
integer not more than x. For example, [5.7] = 5, [– 3.82] = – 4, [– 3] = – 3, etc. Now a days, it is also
called the Floor Function and it is also denoted as [x]. In this section, we will use the symbol [x] for
bracket notation which is also known as Floor Function or Greatest Integer Function.
Now, obviously [x] ≤ x < [x] + 1. So, we get 0 ≤ 5 x < [x] < 1. This expression 'x – [x]’ is called the
Fractional Part Function. This is denoted by {x}. So, {x} = x – [x].
Some important results on [x] and {x} are as follows :
(i) [x] is always an integer
(ii) [x] ≤ x < [x] + 1
(iii) x = [x] + {x} or {x} = x – [x]
 0, if x is an integer
(iv) [x] + [ − x] 
 =-1,if x is not an integer
(v) 0 ≤ {x} < 1
 0, if x is an integer
(vi) [x] + [ − x] 
 =1,if x is not an integer

Solved Examples

Example: If the value of x for |x – 1| = |x – 2| is of the form , where m and n are co–primes, then find the
value of m + n
Solution: |x – 1| = |x – 2|
 x – 1 = x – 2, which is impossible
or x – 1 = x – 2, which is impossible
or x – 1 = –(x – 2)
i.e., x =
m+n=3+2
3+2=5
Hence m + n = 5

Example: Calculate the sum


 1  +  2  +  3  +  4  + .... +  48  +  49  +  50 
             
Solution: 1 = 1, 4 = 2, 9 = 3 etc.

Number of times  k  = 1 is the numbers between 1 and 4 (1 included but 4 is not)


 
So, the gap between the two perfect squares
= (k + 1)² – k² = 2k + 1
i.e.,  k  = 1 occurs 2 × 2 + 1 = 5 times
 
 k  = 2 occurs 2 × 2 + 1 = 5 times
 
 k  = 3 occurs 2 × 3 + 1 = 7 times
 
and so on
Required sum
= 1×3 + 2×5 + 3×7 + 4 × 9 + 5 × 11 + 6 × 13 + 7 × 2 (Note that sequence ends in )
= 3 + 10 + 21 + 36 + 55 + 78 + 14 = 217
PW OLYMPIAD WALLAH 14
IOQM Booster

 x, if x  0
The expression y = |x| called the modulus function represented y = 
 − x, if x  0
So |7.3| = 7.3, |8.923| = 8.923
|–7.3| = 7.3, |–8.923| = 8.923
i.e., |x| is always non–negative.
Some important results:
 x, if x  0
(i) | x |= 
 − x, if x  0
 x − a, if x  a
(ii) | x − a |= 
 a − x, if x  a
(iii) The expression : y = |x – a| + |x – b|, a ≤ b
takes the minimum value when a ≤ x is ≤ b and that minimum value is (b – a).
(iv) The expression : y = |x – a| + |x – b| + |x – c|,
a ≤ b takes the minimum value when a ≤ x is ≤ b and that minimum value is (b – a).

Example: |x – 1| + |x| + |x + 1| = x + 2.
Solution: |x – 1| + |x| + |x + 1|
1 − x − x − x − 1, if x  − 1  − 3x, if x  − 1
1 − x − x + x + 1, if − 1  x  0  2 − x, if − 1  x  0
 
=  =
1 − x + x + x + 1, if 0  x  1  x + 2, if 0  x  1
 x − 1 + x + x + 1, if x  1 3x, if x  1

Case I : x < – 1, then –3x = x + 2  x = –


But that is not possible as x < –1
Case II : –1 ≤ x < 0, then 2 – x = x + 2  x = 0
which is not possible.
Case III : 0 ≤ x < 1, then x + 2 = x + 2
Which is always possible
0≤x<1
Case IV : x  1, then 3x = x + 2
x=1
So, the Soln.s is 0 ≤ x ≤ 1

x   x 
Example: Find the number of positive integers x which satisfy the condition:   =  
 99   101 
x   x 
Solution: Let   = k =  
 99  101 
x
k   k +1
99
i.e., 99 k ≤ x < 99 k + 99
x
and k   k +1
101
I.e., 101 k ≤ x < 101 k + 101

PW OLYMPIAD WALLAH 15
IOQM Booster
From (1) & (2), we have,
101 k ≤ x < 99 k + 99
Now, 101 k ≤ 99 k + 99
gives 2k ≤ 99
i.e., k = 0, 1, 2, 3, …….. 49
(Note : If x is a positive integer then = k is non–negative integer)
For k = 0, 1, 2, 3, ……., 48, the number of positive integral values of x are 99, 97, 95, ……, 3. So
total
Number of possible integral values of
x = (99 + 97 + 95 + …… + 3 + 1) – 1
= 50² – 1 = 249
 x   x  m2 − 4
Note: For any m  2, the number of positive integer x such that  =
   is if
 m − 1  m + 1 4

m2 − 5
m is even and if m is odd.
4

Exponents and Radical Equations


Some important Radical Equations
(i) a0 = 1 (a  0)
(ii) a0 × aq = a0+q
ap
(iii) = a p−q
aq
(iv) a p  b p = ( ab )
q

(a ) = a pq = ( a q )
q p
p
(v)

1
(vi) a − p = (a  0)
ap

Solved Examples

Example: If one root a − x + b − x − a + b is 2012,


then find the possible value of ‘a’ and b’.
Solution: a − x + b − x − a + b squaring on both side, we get

 (a – x) + (b – x) + 2 ( a − x )( b + x ) = a + b + 2 ab

 ( a − x )( b + x ) = ab

 ab + ax – bx – x² = ab
 x² = ax – bx
 x = 0 or x = a – b
One possible value of x is 2012.
 a –b = 2012
So, let b = k, then a = k + 2012 are the possible value of ‘a’ and ‘b’ where ‘k’ is a positive number.

PW OLYMPIAD WALLAH 16
IOQM Booster

1
Example: If = m − n , where m and n are positive integers, what is the value of ‘m + n’?
2011 + 20112 − 1
1
Solution: m− n=
2011 + 2010 − 2012

2
=
4022 + 2 2010 − 2012
2
=
2012 + 2010 + 2  2012  2010
2
=
2012 + 2010

2  2012 − 2010 
=  
 2012 + 2010   2012 − 2010 
  

2  2012 − 2010 
=  
2012 − 2010

=
1
2
( 2012 − 2010 )
= 1006 − 1005
 m = 1006 and n = 1005
So, m + n = 1006 + 1005 = 2011

Example: If 3x + 2y 985 and 3x – 2+y = 473, what is the value of xy?


Solution: 3x + 2y = 985 ……..(1)
3x – 2y = 473 ……..(2)
(1) + (2) gives 2 × 3x = 1458
 3x = 729 – 36
 x = 6 ………(3)
(1) – (2) gives 2 × 2y = 512
 2y = 256 = 28
 y = 8 …….. (4)
So, xy = 6 × 8 = 48

Example: Arrange the following in ascending order:


25555 ,33333 , 62222
Solution: 25555 = (2 5 )1111 = 321111
33333 = (33 )1111 = 271111

62222 = (62 )1111 = 361111


Now, 27 < 32 < 36
 271111  321111  361111
 33333  25555  6 2222

PW OLYMPIAD WALLAH 17
IOQM Booster

Example: Suppose that 4 x1 = 5, 5x 2 = 6, 6 x 3 = 7


126 x123 = 127,127 x124 = 128, If the value of the product X1, X2 ……….. X124 is of the form
where m and n are co–primes then what is the value of mn?

( ) ( x126 x124 )
x124
Solution: 128 = 127 x124 = 126 x123 = 126

( )
x123 x124
= 125 x122 = 125 x122 x123 x124

= 4 x1x 2 x3 ......x123x124
 128 = 27 = 4 x1x 2 x3 .........x123 x124
= 22x1x 2 x 3 .........x123 x124
 7 = 2X1X2X3……X123X124
 X1X2X3……X123X124 =
 m×n=7×2
= 7 × 2 = 14

DIOPHANTINE EQUATION
An equation with more than one variable for which integral solutions are required is called Diophantine
equation.

Type 1: The simplest and typical equation is


ax + by = c ….(1)
where a, b, c are constant integers.
Theorem 1 : The equation ax + by = c has integers solutions iff gcd (a, b) | c.
Proof:
Assume gcd (a, b) does not divide c.
If (x, y) is an integer solution of ax + by = c,
Then left hand side is divisible by gcd (a, b), whereas the right hand side is not, a contradiction. If (a, b) | c,
then
after dividing by (a, b), the equation becomes, a’x + b’y = c’, where a’, b’, c’ are integers and (a’, b’) = 1.
Theorem 2 : If (a, b) = 1, then there exists x,y  Z such that ax + by = 1.
Theorem 3 : If x0, y0 is a special integer solution of the equation ax + by = c, then its general solution is
 x = x 0 + bt
given by  t  Z
 y = y 0 − at,
Type 2: Basic Methods for solving Quadratic Equations on Z

1. Factorization Method: Let the right hand side of the equation be a constant, zero or a power of a prime
number (in the case of quadratic equation), and factorize the left hand side to the form of product of
linear factors, then discuss the possible values of the linear factors based on the factorization of the right
hand side.

2. Discriminant Method: When a quadratic equation with integer coefficients has integer solution(s), its
discriminant must be a perfect square. This feature will play an important role. When the quadratic
equation contains two variables x; y, by the formula for roots, x can be expressed in terms of y, and its
discriminant is an expression in y. Since the discriminant is a perfect square and that y is an integer, y can
be found easily.

Note: Besides the use of discriminant, use of Vieta theorem and transformation or substitution are also useful
tools for solving quadratic equations. Congruence, divisibility, and parity analysis, etc. are often used in
discussing the existence of integer solutions of quadratic equations.

PW OLYMPIAD WALLAH 18
IOQM Booster

EXERCISE # 1

1. How many digits are there in the smallest number which is composed entirely of fives (eg. 55555) and which
is divisible by 99?

2. If A is the sum of the digits of 44444444 and B is the sum of the digits of A then find the sum of the digits
of B.

3. Find the remainder when 9 × 99 × 999 × ….. 99..............9 is divided by 1000.


9 occuring 9 times

3 4
4. Determine all values of x for which   +   = 5.
x x

5. Suppose r is a real number for which


 19   20   21   91 
 r + 100  +  r + 100  +  r + 100  + .... +  r + 100  = 546. Find [100r]
       

6. ‘a’ is an integer satisfying the equation |2a + 7| + |2a – 1| = 8. Then find the number of solution for ‘a’

7. If |x| + x + y = 10 and x + |y| – y = 12, then find x + y.

8. Solve the system x + 3y + |3x – y| = 19, 2x + y = 6.

9. Solve the following system of equation


x3
xy 2 = 108 and = 1010
y

10. Real number ‘a’ an ‘b’ satisfy the equation 3a = 81b+2. What is ab?

11. If x and y are integers such that 3x+2. 123 = 4x–2.9y, determine the value of y.

12. For some positive integers ‘m’ and ‘n’, 2m – 2n = 1792. Determine the value of m2+ n2

13. Find all positive integers x, y, z such that 2x + 2y + 2z = 2336, where x < y < z.

14. Let p1, p2, p3, p4, p5, p6 be prime numbers, each greater than 3. Show that p12 + p 22 + p 32 + p 42 + p 52 + p 62 is
divisible by 6.

15. Prove that the equation x4 + y4 = 2020 has no integral solution.

16. Find the smallest positive integer x such that 12x = 25y2, where y is a positive integer.

17. Let n be the largest positive integer such that n² + 2016n is a perfect square. Determine the remainder
when n is divided by 1000.
PW OLYMPIAD WALLAH 19
IOQM Booster

3 3
18. Find the number of integers x which satisfy the inequality x .
1+ 3 5− 3

19. For m,n integers satisfying 3m + 2 = 5n +3 and 30 < 3m + 2 < 40, find the value of mn.

m
20. If a + b = 1 and the maximum possible value of the product ab is of form where m and n are co–
n
primes, then find mn.

21. If a, b, c and d are four positive real numbers such that abcd =1, then (1 + a) (1 + b) (1 + c)(1 + d) ≥ n
which n is a positive integer, find the value of n.

m
If a, b, c are real numbers such that a + b + c = 0, a² + b² + c² = 1 and a b c 
2 2 2
22. , where m and n are
n
co–prime numbers, then find n – m.

p2 q2 r2 s2 t2
23. For any real numbers p, q, r, s, t ≥ 1, + + + +  x find x (where x is a natural
p −1 q −1 r −1 s −1 t −1
number)

24. Find the smallest natural number which has a remainder of 1 when divided by 2, a remainder of 2 when
divided by 3, a remainder of 3 when divided by 4, a remainder of 4 when divided by 5.

25. Find the product of all of positive integers n that satisfy the following inequality
n < 12 < n + 17 < 2n + 10 < n² – 51

26. What is the largest integer n for which n³ + 1631 is divisible by n + 11?

27. Find the unit digit of 171 + 172 + 173 + 174 + ……. + 1716 + 1717.

28. What is the smallest positive integer K such that K (33 + 43 + 53) = an for some the integers a and n with n
> 1?

8n
29. For how many natural numbers n between 1 and 2014 (both inclusive) is an integer?
9999 − n

30. Given that p, p + 1 and 2p + 1 are prime numbers, find the sum of all possible values of p.

31. Zero was inserted between the digits of a two–digit number divisible by 3, and the result was increased
by twice its hundreds digit. The number obtained happens to be 9 times the initial one. Find the original
number.

32. The next–to–last digit of the square of a natural number is odd. Find the sum of all possible last digits of
these squares.

33. Find the least natural number divisible by 36 which has all 10 digits in its decimal representation.

34. Find the number of integral ordered pairs (x, y) satisfying x2 – 7y = 10

PW OLYMPIAD WALLAH 20
IOQM Booster

EXERCISE # 2
(PREVIOUS YEAR QUESTIONS)

1. Write the number of possible values of ten’s digit for any power of 3. [RMO 1993]

2. A number when divided by 7, 11 and 13 (the prime factors of 1001) successively leave the remainders 6,
10 and 12 respectively. Find the remainder if the number is divided by 1001. [KVS–JMO 2006]

3. Without actually calculating, find which is greater: 3111 or 1714. [KVS–JMO 2007]

4. Find the greatest number of 4 digits, which when divided by 3, 5, 7 and 9 leaves remainder 1, 3, 5 and 7
respectively. [KVS–JMO 2009]

5. Find all the integers which are equal to 11 times the sum of their digits. [KVS–JMO 2010, 2011]

x x
6. How many non–negative integral values of x satisfy the equation   =   ? [PRMO 2012]
5 7

7. Let Sn = n2 + 20n + 12, n a positive integer. What is the sum of all possible values of n for which Sn is a
perfect square. [PRMO– 2012]

8. Let S(M) denote the sum of the digits of a positive integer M written in base 10. Let N be the smallest
positive integer such that S(N) = 2013. What is the value of S(5N + 2013)? [PRMO– 2013]

8n
9. For how many natural numbers n between 1 and 2014 (both inclusive) in an integer?
9999 − n

[PRMO– 2014]

10. Let f be a one – to – one function from the set of natural numbers to itself such that f(mn) = f(m) f(n) for
all natural numbers m and n. What is the least possible value of f(999)? [PRMO– 2014]

11. For natural numbers x and y, let (x, y) denote the greatest common divisor of x and y. How many pairs of
natural numbers x and y with x ≤ y satisfy the equation xy = x + y + (x, y)? [PRMO– 2014]

PW OLYMPIAD WALLAH 21
IOQM Booster
12. The digits of a positive integer n are four consecutive integers in decreasing order when read from left to
right. What is the sum of the possible remainder when n is divided by 37? [PRMO– 2015]

13. What will be the remainder if the number 72015 is divided by 25? [NSEJS 2015]

14. Let n be the largest integer that is the product of exactly 3 distinct prime numbers x, y and 10x + y, where
x and y are digits. What is the sum of the digits of n? [PRMO– 2015]

15. How many two–digit positive integers N have the property that the sum of N and the number obtained by
reversing the order of the digits of is a perfect square? [PRMO– 2015]

16. Let E(n) denote the sum of even digits of n. For example E(1234) = 2 + 4 = 6. What is the value of E(1) +
E(2) + E(3) ….. + E(100)? [PRMO–2015]

17. Assume that a, b, c and d are positive integers such that a5 = b4, c3 = d2 and c – a = 19. Determine d – b.

[KVS–JMO 2016]

18. A natural number a has four–digits and a² ends with the same four–digits of a. Find the value of (10080 –a).
[PRMO– 2016]

19. The five–digits numbers 2a9b1 is a perfect square. Find the value of ab–1 + ba–1. [PRMO– 2016]

20. Consider all 6–digits numbers of the form abccba where b is odd. Determine the number of all such
6–digit numbers that are divisible by 7. [PRMO– 2018]

21. A book is published in three volumes, the pages being numbered from 1 onwards. The page numbers are
continued from the first volume to the second volume to the third. The number of pages in the second
volume is 50 more than that in the first volume, and the number of pages in the third volume is one and a
half times that in the second. The sum of the page numbers on the first pages of the three volumes is
1709. If n is the last page number, what is the largest prime factor of n? [PRMO– 2018]

22. Let x1 be a positive real number and for every integer n ≥ 1 let xn + 1 = 1 + x1 x2 …xn. If x5 = 43. What is
the sum of digits of the largest prime factor of x6. [PRMO–2019]

PW OLYMPIAD WALLAH 22
IOQM Booster

ab
23. Positive integers a, b, c satisfy = c. What is the largest possible value of a + b + c not exceeding 99?
a−b
[IOQM-2021]

24. How many two digits numbers have exactly 4 positive factors? (Here 1 and the number n are also
considered as factor of n.) [IOQM– 2021]

25. The product 55 × 60 is written as the product of five distinct positive integers. What is the least possible
value of the largest of these integers? [IOQM– 2021]

q m
26. Suppose the prime numbers p and q satisfy q² + 3p = 197p² + q. Write as + , where l, m, n are
p n
positive integers, m < 1 and GCD (m, n) = 1. Find the maximum value of l + m + n. [IOQM– 2021]

27. Let m, n be natural numbers such that m + 3n – 5 = 2LCM (m, n) – 11 GCD(m, n), Find the maximum
possible value of m + n. [IOQM– 2022]

28. Let m be the smallest positive integer such that m2 + (m + 1)² + …..+(m + 10)² is the square of a positive
integer n. Find m + n. [IOQM– 2022]

29. Let x, y be positive integers such that x4 = (x – 1)(y3 – 23) – 1. Find the maximum possible value of x + y.
[IOQM– 2023]

PW OLYMPIAD WALLAH 23
IOQM Booster

Answer Key

EXERCISE # 1

1. 18 9. x = 104, 17. 9 28. 1


2. 7 y = 102 18. 4 29. 1
3. 109 10. 60 19. 84 30. 5
4 11. 5 20. 4 31. 69
4. 1 x 
3 12. 185 21. 16 32. 6
5. 743 13. x=5 22. 53 33. 1023457896
6. 04 y=8 23. 20 34. 0
7. 18/5 z = 11 24. 59
1 14. 25. 990
8. x= ,y = 5
2 15. 26. 289
16. 75 27. 7

EXERCISE # 2
(PREVIOUS YEAR QUESTIONS)

1. 5 9. 1 17. 757 25. 15


2. 1000 10. 24 18. 704 26. 32
3. 1714 11. 3 19. 21 27. 70
4. 9763 12. 217 20. 70 28. 95
5. 198 13. 18 21. 17 29. 07
6. 9 14. 12 22. 13
7. 16 15. 8 23. 99
8. 18 16. 400 24. 30

PW Web/App - https://smart.link/7wwosivoicgd4

Library- https://smart.link/sdfez8ejd80if

PW OLYMPIAD WALLAH 24

You might also like