Number Theory - Assignment
Number Theory - Assignment
NUMBER THEORY
LEVEL – 1
Fundamental Theorem of Arithmetic, GCD, LCM and Divisibility
1. Which of the following numbers is a perfect square?
14!15! 15!16! 16!17! 17!18!
(a) (b) (c) (d)
2 2 2 2
2. Give two different prime numbers p and q. find the number of different divisors of the number
(a) pq; (b) p2q; (c) p2q2
3. A standard six-sided die is rolled, and P is the product of the five numbers that are visible. What is
the largest number that is certain to divide P?
4. The product of any two of the positive integers 30, 72 and N is divisible by the third. What is the
smallest possible value of N?
5. Find all solutions in natural numbers of the equations : x2 - y2 = 303.
6. Let (a,b) denote the greatest common factor of a and b, and let [a,b] denote the least common
multiple of a and b. Evaluate the following expressions
(a) (15,20) (b) (66,121) (c) (126,184) (d) (2143567, 2143369)
7. Given a prime number P, find the number of natural numbers which are
(a) Less than P and relatively prime to it
(b) Less than P2 and relatively prime to it.
8. The numbers a and b satisfy the equation 56a = 65b. Prove that a + b is composite.
Division Algorithm
9. Given natural numbers a, b, and c such that a +b+ c is divisible by 6, prove that a3 + b3+ c3 is also
divisible by 6.
10. Prove that n3 + 2 is not divisible by 9 for any integer n
11. The natural numbers x, y, and z satisfy the equation x2 +y2 = z2. Prove that at least one of them is
divisible by 3.
12. Prove that n5 + 4n is divisible by 5 for any integer n.
13. (a) Given that p, p + 10, and p + 14 are prime numbers,find p
NUMBER THEORY 2
Euclidean Algorithm
28. The greatest number that divides 22176 and 22396 without leaving any remainder is.
(a). 48 (b) 42 (c) 38 (d) 52 (e) None of these
29. Find all integers x and y such that (x, y) = 8 and |x, y| = 64
30. The product of two positive integers is 9984 and the greatest common factor of those integers equals
that difference between them. What are the two integers?
NUMBER THEORY 3
Congruence
31. Prove that for any natural number n the expression A = 2903n – 803n – 464n + 261n is divisible by
1897
32. Show that the square of an odd integer is 1 (mod 8)
33. Show that the square of an integer is 0 or 1 (mod 3)
34. Show that the square of an integer is 0,1, – 1 (mod 5)
35. If an integer n is co-prime to 6 then show that n2 1 (mod 24)
36. Prove that n2 +1 is not divisible by 3 for any integer n
37. Find the remainder when the number 1010 + 10100 + 101000 + … + 10100000000 is divided by 7.
38. What is the remainder of 1234567894 when it is divided by 8?
39. What is the remainder when 91990 is divided by 11?
40. (i) Find the remainders when 250 and 4165 are divided by 7.
(ii) Find the remainder when 1373 + 143 is divided by 11.
41. (a) Find all positive integers n for which 2n– 1 is divisible by 7.
(b) Prove that there is no positive integer n for which 2n + 1 is divisible by 7.
42. Find the last two digits of 2999.
43. The six digit number abcdef satisfies the property that def − abc is divisible 7. Prove that the
number itself is divisible by 7. Using this information attempt the following:
(a) State and prove a test for divisibility by 7
(b) State and prove a test for divisibility by 13
44. Is it possible for the sum of the first several natural numbers to be 1989?
45. Prove that if you reverse the order of the digits in any natural number and subtract the result from the
initial number, then the difference is divisible by 9.
46. Prove that a power of 2 cannot end with four equal digits.
NUMBER THEORY 4
Divisibility Tests
47. Find the last two digits of the following number 75 x 35 x 47 x 63 x 71 x 87 x 82
(a)50 (b) 70 (c) 30 (d) 90
48. Tom multiplied two two-digit numbers on the blackboard. Then he changed all the digits to letters
(different digits were changed to different letters, and equal digits were changed to the same letter).
He obtained AB⤫CD =EEFF Prove that Tom made a mistake somewhere.
49. Find at least one 100 digit number without zeroes in its decimal representation, which is
divisible by the sum of its digits.
50. How many four digit numbers with the two middle digits 97 are divisible by 45?
51. Find the smallest number written only with ones which is divisible by 333…33 (one hundred 3’s in
the representation).
52. Prove that the number a1a 2 ....a n a n .....a 2a1 is composite.
Diophantine Equation
65. (CHINA/1990) An integer solution of the equation 1990x –1989y = 1991 is
(A) x = 12785; y = 12768; (B) x = 12785; y = 12770;
(C) x = 11936; y = 11941; (D) x = 13827; y = 12623.
A B 17
66. (SSSMO(J)/2002) Two positive integers A and B satisfy + = Find the value of
11 3 33
A2 + B2.
67. A dragonfly has six feet and a spider has 8 feet. Given that a certain group of dragonflies and spiders
have in total 46 feet, find the number of dragonflies and the number of spiders.
68. If a four digit number and the sum of its all digits have a sum 2006, find the four digit number.
69. (Ancient Question) In an ancient chicken market, each rooster is sold for 5 coins, each hen for 3
coins and each chick for 1/3 coins. Someone has 100 coins to buy 100 chickens, how many roosters,
hens and chicks can a man purchase out of a total cost of 100 coins?
70. Solve the equation 3x + 5y = 7 in integers.
71. Solve the equation 1990x – 173y = 11 in integers.
72. Find all integer roots of the equations 21x + 48y = 6.
73. Find all integer roots of the equation x2 + y2 =4z – 1
74. Solve for integer values of the variables: x3 + 21y2 + 5 = 0
75. Solve for integer values of the variables: 15x2 – 7y2 = 9
76. Solve for integer values of the variables: x2 – y2 = 1988
77. (CHINA/2003)) Find the integer solutions of the equation 6xy + 4x – 9y – 7 = 0.
78. (KIEV/1962) Prove that the equation x2 + y2 = 3z2 has no integer solution (x; y; z) ≠ (0; 0; 0).
1260
79. (CHINA/2003) Given that is a positive integer, where a is a positive integer. Find the value
a +a −6
2
of a
80. (CHINA/2001) How many number of pairs (x; y) of two integers satisfy the equation x2 –y2 = 12?
81. (SSSMO(J)/2004) Let x; y; z and w represent four distinct positive integers such that
x 2 − y2 = z 2 − w 2 = 81 . Find the value of xz + yw + xw + yz.
82. (CHINA/2003) Find the number of non-zero integer solutions (x; y) to the equation
15 3 2
2
+ − =2
x y xy x
NUMBER THEORY 6
x 14
83. CHINA/2001) Find the number of positive integer solutions to the equation + =3
3 y
2 3 1
84. (CHINA/2001) Find the number of positive integer solutions of the equation − =
x y 4
85. (SSSMO/2003) Let p be a positive prime number such that the equation x 2 − px − 580p = 0 has two
integer solutions. Find the value of p.
86. (CHINA/1993) The number of positive integer solutions (x, y, z) for the system of simultaneous
xy + xz = 255
equations is:
xy + yz = 31
(A) 3; (B) 2; (C) 1; (D) 0.
95. Let n be a natural number not divisible by 17. Prove that either n8 + 1 or n8 – 1 is divisible by 17.
Since (n8 + 1) (n8 –1) = n16 – 1
By Fermat theorem, n16 1 (mod 17)
⇒ One of the factors must be divisible by 17
NUMBER THEORY 7
96. (a) Let p be a prime not equal to 3. Prove that the number 111….11 (p ones) is not divisible by p.
(b) Let p > 5 be a prime. Prove that the number 1111.11 (p–1 ones) is divisible by p.
97. Show that, 11| ( 510 − 310 ) . More generally, if p is a prime such that p∤a and p∤b, then show that
p | ( a p −1 − b p −1 ) .
98. Prove that and (i) 7 | (111333 + 333111 ) (ii) 39 | ( 53103 + 10353 ) .
99. If p and q are distinct primes, show that pq-1 + qp-1 1 (mod pq)
100. Find the remainder when 7200 + 11800 is divided by 101.
101. Show that 89 | ( 244 − 1) and 97| ( 2 48 − 1)
Base System
102. Prove that (5236)9 is divisible by 10
103. The number (2324a1013)7 is converted to base 10 and then divided by 6. It leaves no remainder.
What could be the value of a?
(a) 0 (b) 1 (c) 2 (d) 3
104. Find the fourth root of (14641)9.
105. How many 4-digit numbers in base 9 are perfect squares?
106. In a number system 4 x 6 = 30 and 5 x 6 = 36, then the value of 3 x 4 x 5 in the same number system
is
(a) 60 (b) 66 (c) 74 (d) 76
107. A two digit number A in base 11 is one-third of the number formed by reversing its digits when
considered in base 19. How many such numbers are possible?
(a) 5 (b) 6 (c) 7 (d) 8
108. In a number system the product of 44b and 11b is 1034b. The number 3111b of this system, when
converted to the decimal number system, becomes?
(a) 406 (b) 1086 (c) 213 (d) 691
109. A three digit non-zero number ‘ABC in base 5, when converted to base 7, becomes ‘CBA’. Which of
the following is necessarily true ?
(a) A must be 2 (b) B must be 0 (c) C must be 2 (d) None of these
110. Let a, b, c be distinct digits. Consider a two-digit number ‘ab’ and a three-digit number ‘ccb’, both
defined under the usual decimal number system, if (ab)2 = ccb > 300, then the value of b is?
NUMBER THEORY 8
112. What will be the number of zeros in (2000!)34. Here 34 is the base in which the number is written.
(a) 122 (b) 123 (c) 124 (d) 25
113. In familiar decimal number System the base is 10, in another number system using base 4, the
counting proceeds as 1, 2, 3, 10, 11, 12, 13, 20, 21, ……. The twentieth number in this system will
be
(a) 40 (b) 320 (c) 210 (d) 110
114. In a certain number system 363 + 1056 = 1452. Find the value of of (654 – 456) in the same number
system.
(a) 156 (b) 165 (c) 178 (d) 198
LEVEL II
1. The sum of two positive integers is 52 and their LCM is 168. Find the numbers.
2. An infinite sequence of positive integers (an) is such that for any two positive integers i j
3. Find the least odd positive integer m such that (m + 164)(m2 + 1642) is a square number.
4. Three prime numbers p, q, and r, all greater than 3, form an arithmetic progression: p, q = p + d, and
r = p + 2d. Prove that d is divisible by 6.
5. Prove that the number 100…00500..001 (100 zeros in each group) is not a perfect cube.
6. Prove that the number 6n3 + 3 cannot be a perfect sixth power of an integer for any natural number n.
7. If a nine-digit number is formed by the nine non-zero digits, and its unit digit is 5, prove that it must
not be perfect square.
8. For any n > 1 prove that the sum of any n consecutive odd natural numbers is a composite number
9. Prove that if (n - 1)!+ 1 is divisible by n. then n is a prime number.
10. Prove that there exists a natural number n such that the numbers n + 1, n+ 2, ...., n + 1989 are all
composite
11. Prove that there are infinitely many prime numbers.
12. (a) If it is known that a + 1 is divisible by 3, prove that 4 +7a is also divisible by 3.
b) It is known that 2 + a and 35 – b are divisible by 11. Prove that a + b is also divisible by 11
7
13. Find the last digit of the number 7 7
14
14. Find the last two digits of 1414
15. (SSSMO(J)/2001) Write down the last four digits of the number 7128
16. If p and q are primes such that p = q + 2, prove that pp + qq is a multiple of p + q
18. Let ‘a’ be a rational number. Show that if 11 + 11 11a 2 + 1 is an odd integer, then it must be a perfect
square.
19. Prove that 2p + 3p is not a perfect power (i.e. a perfect square, cube etc.) if p is a prime number
20. Let f(m, n) = 36m – 5n, where m, n are natural numbers. Find the smallest value of |f(m,n)|. Justify
your answer.
21. Prove that 103n+1 cannot be represented as a sum of the cubes of two integers.
NUMBER THEORY 10
22. A three digit number was decreased by the sum of its digits. Then the same operation was carried out
with the resulting number, et cetera, 100 times in all. Prove that the final number is zero
23. Let A be the sum of the digits of 44444444, and B the sum of the digits of A. Find the sum of the
digits of B
24. Let a, b, c, d be distinct digits. Prove that cdcdcdcd is not divisible by aabb
25. Prove that if p is a prime and a, b are any positive integers, then
(i) ( ) 2 ( mod p )
2p
p (ii) ( ) 2 ( mod p ) ,
2P
p
2
26. (CHINA/1992) If x and y are positive integers, prove that the values of x 2 + y + 1 and y2 + 4x + 3
cannot both be perfect squares at the same time.
27. (SSSMO(J)/1997) Suppose x; y and z are positive integers such that x > y > z > 663 and x; y and z
satisfy the following:
x + y + z = 1998
2x + 3y + 4z = 5992:
Find the values of x; y and z.
28. (ASUMO/1988) Prove that there are infinitely many positive integer solutions (x; y; z) to the
equation x - y + z = 1, such that x; y; z are distinct, and any two of them have a product which is
divisible by the remaining number.
29. Prove that for relatively prime two positive integers a and b, the equation
ax + by = c must have non-negative integer solution if c > ab – a – b.
38. (ASUMO/1988) There are two piles of pebbles, pile (A) and pile (B). When 100 pebbles are moved
from (A) to (B), then the number of pebbles in (B) is double of that in (A). However, if some are
moved from (B) to (A), then the number of pebbles in (A) is five times more than that in (B). What is
the minimum possible number of pebbles in (A), and find the number of pebbles in (B) in that case.
39. Show that if x and y are positive integers such that x 2 + y2 − x is divisible by 2xy, then x is a perfect
square.
( )
26
40. (i) Find the remainder of 25733 + 46 when it is divided by 50
27
(ii) Find the remainder of 4737 when it is divided by 11.
41. Prove that the product of the last digit of the number 2n and of the sum of all its digit but the last is
divisible by 3.
42. Prove that for any positive integer n, n4 + 2n3 + 2n2 + 2n + 1 is not a perfect square
43. Show that if 2n + 1 and 3n + 1 are both perfect squares then 40|n.
44. Call a natural number n “convenient”, if n2+ 1 divisible by 1000001. Prove that among the number
1,2,……1000000 there are evenly many “convenient” numbers.
45. The sum of the numbers a, b and c is divisible by 30. Prove that a5 + b5 + c5 is also divisible by 30.
46. Prove that for each prime p the difference
111…11222…2233…33…88…88999…99 – 123456789 (in the first number each non-zero is
written exactly p times) is divisible by p.
NUMBER THEORY 12
LEVEL III
1. (USSR/1962) Prove that the only solution in integers of the equation x 2 + y2 + z 2 = 2xyz is x = y = z
= 0.
2. (MOSCOW/1940) Find all three-digit numbers such that each is equal to the sum of the factorials of
its own digits.
3. (SSSMO/2005) How many ordered pairs of integers (x; y) satisfy the equation
x 2 + y2 = 2 ( x + y ) + xy?
4. (BMO/1991) Prove that the number 3n + 2 × 17n, where n is a non-negative integer, is never a perfect
square.
5. (IMO/1986) Let d be any positive integer not equal to 2, 5, or 13. Show that one can find distinct a, b
in the set {2, 5, 13, d} such that ab – 1 is not a perfect square.
Thus, in any case at least one of three numbers 2d –12, 5d –1, 13d –1 is not a perfect square
6. (KIEV/1980) Multiply some natural number by 2 and then plus 1, and then carry out this operation
on the resultant number, and so on. After repeating 100 times of such operations, whether the
resulting number is divisible by (i) 1980? (ii) 1981?
7. (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.
8. (AIME/1986) In a parlor game, the magician asks one of the participants to think of a three digit
number abc where a; b, and c represent digits in base 10 in the order indicated. The magician then
asks this person to form the numbers acb, bca, bac,cab and cba to add these five numbers, and to
reveal their sum, N . If told the value of N , the magician can identify the original number, abc . Play
the role of the magician and determine the abc if N = 3194.
9. With each entry 1 submit, I have to write a different pair of positive integers whose greatest common
factor is 1 and whose sum is 2000. (Pairs differing only in the order of addition are counted as 1 pair,
NOT two different pairs) For example, I submitted the pair (1,1999) with my first entry. With these
restrictions, at most how many entries can one person submit?
NUMBER THEORY 13
10. Let [r, s] denote the least common multiple of positive integers r and s. Find the number ordered
triples (a, b, c) of positive integers for which [a, b] = 1000, [b, c] = 2000, and [c, a] =2000
11. Given natural numbers x, y. and z such that x2 + y2 = z2. Prove that xy is divisible by 12.
n3 + 1
12. (IMO/1994) Determine all ordered pairs (m; n) of positive integers such that is an integer.
mn − 1
13. (USAMO/1975) Determine all integral solutions of a 2 + b 2 + c 2 = a 2 b 2
14. (IMO/Shortlist/1989) Given the equation
4x3 + 4x 2 y − 15xy2 − 18y3 − 12x 2 + 6xy + 36y2 + 5x −10y = 0 find all positive integer solutions.
15. (RMO 2016) For any natural number n, expressed in base 10, let S(n) denote the sum of all digits of
n. Find all natural numbers n such that n3 = 8S(n)3 + 6nS(n) + 1.
16. (RMO 2016) How many 6-digit natural numbers containing only the digits 1, 2, 3 are there in which
3 occurs exactly twice and the number is divisible by 9?
17. (RMO 2015) Find all integers a, b, c such that a2 = bc + 1, b2 = ca + 1.
18. (RMO 2018)For a rational number r, its period is the length of the smallest repeating block in its
decimal expansion. For example, the number r = 0.123123123…… has period 3. If S denotes the set
of all rational number r of the form r = abcdefgh having period 8, find the sum of all the elements of
S.
19. (RMO 2015) Find all three digit natural numbers of the form (abc)10 such that (abc)10, (bca)10 and
(cab)10 are in geometric progression. (Here {abc)10 is representation in base 10.
20. (2020 PRMO KV) If x and y are positive integers such that (x – 4)(x – 10) = 2y, find the maximum
possible value of x + y.
21. (2020 PRMO KV) Find the largest positive integer N such that the number of integers in the set
{1,2,3……..N} which are divisible by 3 is equal to the number of integers winch are divisible by 5
or 7 (or both).
NUMBER THEORY 14
VIDEO SOLUTIONS
https://docs.google.com/spreadsheets/d/19NJKtABDTPlGiiB_4tC_7BQ93aAs5hwG
wJv94Ag603M/edit?usp=sharing
ANSWERS KEY
LEVEL I
1. d 2. (a) 4, (b) 6, (c) 9 3. 12 4. 60
5. (x, y) = (52, 49), (151, 151) 6. (a) 5, (b) 11, (c) 2436, (d) 1
68. 1984, 2002 69. (0, 25, 75), (4, 18, 78), (8, 11, 81), (12, 4, 84)
77. x = 1, y = –1 79. a = 3,4,6,9,11 80. (4, 2): (4,–2) ; (–4,–2) and (–4,2) 81. 2187
LEVEL II
1. 24, 28 3. 205 13. 3 14. 36
31. (1, a, –a), (b, 1, -b), (c, –c, 1), where a, b and c arbitrary integers. (1, 2, 3), (2, 4, 4), (3, 3, 3)
35. 000,001,625 and 376 36. (p; q) is (13; 7). 37. 120
LEVEL III
12. (2,2), (2,1) (3,1), (5,2), (5,3), (1,2), (1,3) (2,5), (3,5)
16. Zero 17. (a, b, c) = (1, –1, 0), (–1,1, 0), (1,0, -1), (–1.0, 1), (0,1, -1), (0, –1, 1)
18. 49995000 19. 111, 222, 333, 444, 555, 666, 777, 888, 999,432,864.
20. 16 21. 65
NUMBER THEORY 16
SOLUTIONS
LEVEL I
Fundamental Theorem of Arithmetic, GCD, LCM and Divisibility
1. Which of the following numbers is a perfect square?
14!15! 15!16! 16!17! 17!18!
(a) (b) (c) (d)
2 2 2 2
17!17!18
= 9 (17!)
2
Sol. (d)
2
2. Give two different prime numbers p and q. find the number of different divisors of the number
(a) pq; (b) p2q; (c) p2q2
x + y = 303
x–y=1
x = 152
y = 151
6. Let (a,b) denote the greatest common factor of a and b, and let [a,b] denote the least common multiple of a
and b. Evaluate the following expressions
(a) (15,20) (b) (66,121) (c) (126,184) (d) (2143567, 2143369)
Sol. (a) 15 → 3 × 5
20 → 22 × 5’
(15,20) = 5
(b) 66 → 11 x 3 x 2
121 →112
(66, 121) = 11
(c) 126 → 212 36
184 → 3824
(126, 184) = 2436
(d) 2143567 – 2143369 = 198
g.c.d divides 198 also
198 → 2 x 11 x 3 x 3
Given numbers not divisible by 2,11,3
g.c.d = 1
7. Given a prime number P, find the number of natural numbers which are
(a) Less than P and relatively prime to it
(b) Less than P2 and relatively prime to it.
a + b = 121m = 112 m
Division Algorithm
9. Given natural numbers a, b, and c such that a +b+ c is divisible by 6, prove that a 3 + b3+ c3 is also divisible by
6.
Sol. M1. a3 + b3 + c3 = 3abc + (a + b + c) (a2 + b2 + c2 – ab –bc –ca)
a + b + c is divisible by 6
a + b + c is even no
atleast one is even
abc is multiple of 2
3abc is multiple of 6
M2.
n3 ≡ n(mod6)
a3 + b3 + c3 ≡ a + b + c (mod6)
10. Prove that n3 + 2 is not divisible by 9 for any integer n
Sol. n3 + 2
(i) n =3k
n3 + 2 = 27k3 + 2
=9m + 2
(ii) n =3k + 1
n3 + 2 = 27k3 + 9k(3k+1) + 3
= 9m + 3
(iii) n = 3k + 2
n3 + 2 = 27k + 18k (3k + 2) + 10
= 9m + 1
Not divisible by 9
11. The natural numbers x, y, and z satisfy the equation x2 +y2 = z2. Prove that at least one of them is divisible by
3.
Sol. z2 – x2 = y2
(z–x) (z + x) = y2
If z & x of the type 3k + 1 or 3k + 2
NUMBER THEORY 19
15. Given the pair of prime numbers p and p2 + 2, prove that p3 + 2 is also a prime number.
Sol. (i) If p = 2
p2 + 2=6 not prime
(ii) If p = 3
3,11,29 all prime
For p > 3, p can be 3k+1 or 3k+2
(iii) If p = 3k + 1
p2 + 2 = (3k + 1)2 + 2 = 9k2 + 6k + 3 = 3m not prime
(iv) If p = 3k + 2
p2 + 2 = (3k + 2)2 + 2 = 9k2 + 12k + 6 = 3m not prime
only for p=3, p2 + 2 & p3 + 2 are prime.
16. Prove that the sum of the squares of five consecutive natural numbers cannot be a perfect square.
Sol. n2 + (n + 1)2 + (n + 2)2 + (n + 3)2 + (n+4)2
square of even no of type 4k
square of odd no of type 4k + 1
Case : 1 If n odd 4(u +v + w + x +y) + 3 = 4P + 3 not square
Case : 2 If n even 4(u +v + w + x +y) + 2 = 4P + 2 not square
17. Prove that p2 – q2 is divisible by 24 if p and q are prime numbers greater than 3.
Sol. p2 – q2 = (p – q)(p + q)
p & q of the type 3m+1 or 3m+2
In all combinations (p-q)(p+q) contain multiple of 3.
Similarly, p & q of the type 4m+1 or 4m+3
In all combinations (p-q)(p+q) contain multiple of 8.
⇒ p2 - q2 is divisible by 24
18. Find all integers which leave remainder 1 when divided by 3, remainder 2 when divided by 10
Sol. x = 3m + 1 x = 1,4,7,10,13,16,19,22,…..
x = 10n + 2 x = 2, 12, 22, 32, ……
x = 22 +30 k; K Z
19. Find all primes p such that both p and p2 + 8 are primes
Sol. (i) If p = 2
P2 + 8 = 12 not prime
(ii) If P = 3
NUMBER THEORY 21
P2 + 8 = 17 prime
For p > 3 p2 is of the form 6k + 1
P2 + 8 = 6k + 9 not prime
p = 3 only
31 3
32 2
NUMBER THEORY 22
33 6
34 4
35 5
36 1
7
3 3
Cyclicity = 6
1989 x 6 x 331 + 3
Remainder = 6
24. Find the units digit of 3100
Ans. d
27. Find the last two digits of the following number
101 x 102 x 103 x 197 x 198 x 199
(a) 54 (b) 74 (c) 64 (d) 84
Sol. (100+1)(100+2)(100+3)(200-1)(200-2)(200-3)
= m00 – 1x2x3x1x2x3 = m00 – 36 = m‘64
28. Find last two digits of 6100 + 781.
Sol. 65k + 74m+1 = 76 + 7 = 83
Euclidean Algorithm
29. The greatest number that divides 22176 and 22396 without leaving any remainder is.
(a). 48 (b) 42 (c) 38 (d) 52 (e) None of these
Sol. HCF(22176, 22396) = HCF(22176, 22396 - 22176) = (22176, 220) = 44(504, 5) = 44
30. Find all integers x and y such that (x, y) = 8 and |x, y| = 64
Sol. (x, y) = 8 & |x, y| = 64
x =8x1 & y = 8y1 & (x1, y1) = 1
NUMBER THEORY 23
|x1, y1| = 8 = 8 × 1, 1 × 8
(x, y) = (64,8), (8,64)
31. The product of two positive integers is 9984 and the greatest common factor of those integers equals that
difference between them. What are the two integers?
Sol. Let the no.s x & y & g.c.d = m
x = mx1 & y = my1
xy = m2x1y1 = 9984 = 28 × 31 × 131
x – y = m x1 –y1 = 1⇒ one of them is odd and other is even.
m2 x1y1 =2831131
(i) m = 1
x1y1 = 28 31 131
x1 – y1= 1
No pair possible
(ii) m = 2
x1y1 = 26 × 31 × 131
No pair possible
(iii) m = 22
x1y1 = 24× 31 × 131
No pair possible
(iv) m = 23
x1y1 = 22× 31 × 131
x1 = 13,y1 = 12
(v) m = 24
x1y1 = 31 × 131
No pair possible
Answer is 104, 96
Congruence
32. Prove that for any natural number n the expression A = 2903n – 803n – 464n + 261n is divisible by 1897
Sol Let n be a natural number. Note that 1897 = 7 × 271.
Consider the expression A = 2903n – 803n – 464n + 261n.
Now 2903 803 (mod 7) and 464 261 (mod 7).
NUMBER THEORY 24
Also 2903 464 (mod 271) and 803 261 (mod 271) .
Hence A is divisible by 7 as well as 271. Since (7,271) = 1,
we get that A is divisible by 1897.
33. Show that the square of an odd integer is 1 (mod 8)
Sol. x ± 1, ± 3 mod (8)
x2 1,9 mod 8
x2 1 mod 8
34. Show that the square of an integer is 0 or 1 (mod 3)
Sol. x 0, ± 1 mod (3)
x2 0,1 mod (3)
35. Show that the square of an integer is 0,1, – 1 (mod 5)
Sol. x 0, ± 1, ± 2 mod(5)
x2 0,1,4 mod (5)
x2 0, ± 1 mod (5)
36. If an integer n is co-prime to 6 then show that n2 1 (mod 24)
Sol. n ± 1, ± 5, ± 7, ± 11 mod (24)
n2 1,2,5,4,9,121 mod (24)
n2 1 mod (24)
37. Prove that n2 +1 is not divisible by 3 for any integer n
Sol. n 0, ± 1(mod3)
n2 + 1 1, 2 (mod 3)
Thus we never get n2 + 1 0 (mod 3)
38. Find the remainder when the number 1010 + 10100 + 101000 + … + 10100000000 is divided by 7.
Sol. 103 – 1 mod (7)
106 = 1 mod (7)
Also, 10n = 4 mod (6)
10n = 6k + 4
106k + 4 –10 4 mod (7)
1010 + 10100 + .. + 1010000000 32 4 mod (7)
39. What is the remainder of 1234567894 when it is divided by 8?
Sol. 12345789 5 mod (8)
NUMBER THEORY 25
2n +1 2, 3, 5 mod (7)
Not divisible for any n.
43. Find the last two digits of 2999.
Sol. 210 24 mod (100)
220 76 mod (100)
(220)49 7649 mod (100)
2980 76 mod (100)
219 38mod (100)
2999 88 mod (100)
44. The six digit number abcdef satisfies the property that def − abc is divisible 7. Prove that the number itself
is divisible by 7. Using this information attempt the following:
(a) State and prove a test for divisibility by 7
(b) State and prove a test for divisibility by 13
Sol. ( ) ( )
abcdef = 1000 abc + def 6 abc + def mod ( 7 )
(a) & (b). A number is divisible by 7 (or by 13) if and only if the following operation
gives us a number divisible by 7 (or by 13):
Starting at the right of the number, group the digits in threes and alternately add and subtract the
resulting numbers.
Example: 10345678. The operation described gives us 678 - 345 + 10 = 343 which
is divisible by 7. Thus, the original number is divisible by 7 as well.
They use the fact that 1000 -1 mod(7 and13).
45. Is it possible for the sum of the first several natural numbers to be 1989?
n ( n + 1)
Sol. = 1989
2
n(n+1) = 3978
3978 3 mod (5)
n (n+1) 0,2,1 mod (5)
not possible
NUMBER THEORY 27
46. Prove that if you reverse the order of the digits in any natural number and subtract the result from the initial
number, then the difference is divisible by 9.
Sol. a1a2…….an-1an – anan-1 …a2a1
(a1 + a2 + ….+an-1 + an) – (an + an-1 + a2 + a1) mod 9
0 mod 9
47. Prove that a power of 2 cannot end with four equal digits.
Sol. Put 2n 0 mod (16) for n ≥ 4
Abbbb = 104 a + b (1111) b (1111) mod (16)
7b (mod 16)
≠ 0 mod (16) [ b = 2, 4, 6, 8]
Divisibility Tests
48. Find the last two digits of the following number 75 x 35 x 47 x 63 x 71 x 87 x 82
(a)50 (b) 70 (c) 30 (d) 90
Sol. As the product is divisible by 2 and 5 so last digit must be zero.
Also the product divisible by 25 so that last two digit must divisible by 25. Therefore second last
digit is 5. Second digit can not be zero as product has only one 2.
49. Tom multiplied two two-digit numbers on the blackboard. Then he changed all the digits to letters (different
digits were changed to different letters, and equal digits were changed to the same letter). He obtained
AB⤫CD =EEFF Prove that Tom made a mistake somewhere.
Sol. EEFF = 1100E + 11F
= 11[100E + F]
One of AB or CD contains multiple of 11 But in that case both the digits must be same which is not
possible.
50. Find at least one 100 digit number without zeroes in its decimal representation, which is
divisible by the sum of its digits.
Sol. Let us find, by trial and error, a number with the sum of its digits equal to 125.
Divisibility by 125 is determined by the last three digits of a number.
Thus, the number 111……..11599125 will do (the number beings with 94 ones)
51. How many four digit numbers with the two middle digits 97 are divisible by 45?
Sol. a97b = 1000a + 970 + b b mod (5)
NUMBER THEORY 28
b = 0, 5
(i) for b = 0
a970 a + 7 mod (9)
a=2
(ii) for b = 5
a975 a + 7 + 5 mod (9)
a + 12 mod (9)
a=6
2970, 6975
52. Find the smallest number written only with ones which is divisible by 333…33 (one hundred 3’s in the
representation).
Sol. This number is written with three hundred l's. Indeed, it is divisible
by 3 and it is divisible by 111 ... 11 (one hundred 1's), which are co-prime. To prove
that this is the minimum number required we notice first that the required number
must have a number of digits divisible by 100-otherwise it would not be divisible
by 111 ... 11 (one hundred l's). Secondly, the numbers 111 ... 11 (one hundred l's)
and 111 ... 11 (two hundred l's) are not divisible by 3.
53. Prove that the number a1a 2 ....a n a n .....a 2a1 is composite.
= 0 mod (11)
5n 2 − 5n − 5 = 5 ( n 2 − n − 1) = 52 when n = 3 ;
( 2n + 1) = 4n 2 + 4n + 1 4n 2 + 4n + 4 4n 2 + 8n + 4 = ( 2n + 2 )
2 2
For n 32 , n 2 = (10a + b ) = 100a 2 + 20ab + b 2 . The number 100a2 + 20 ab has units digit 0 and an
2
Sol.
even tens digit. If the tens digit carried from b2 is odd, then b = 4 or 6 only, so b2 = 16 or 36, i.e. the
unit digit of n2 must be 6.
57. Is it possible to write a perfect square using only the digits (a) 2,3,6; (b) 1,2,3 exactly 10 times each?
Sol. Every square of the form 9k, 9k+1, 9k+4 or 9k+7
(a) x 2 10 ( 2 + 3 + 6 ) 2 mod ( 9 )
59. Is there a three digit number abc ( where a c ) such that abc − cba is a perfect square?
64. Prove that there is no three digit number abc , such that abc + bca + cab is a perfect square.
Diophantine Equation
66. (CHINA/1990) An integer solution of the equation 1990x –1989y = 1991 is
(A) x = 12785; y = 12768; (B) x = 12785; y = 12770;
(C) x = 11936; y = 11941; (D) x = 13827; y = 12623.
Sol. The given equation implies y 1 (mod10), only C is possible. By checking (C) is a solution. Thus
the answer is (C).
A B 17
67. (SSSMO(J)/2002) Two positive integers A and B satisfy + = Find the value of
11 3 33
A2 + B2.
3A + 11B 17
Sol. The given equality yields = , so It is easy to find the special solution (2,1) for(A,B). Since
33 33
the general solution is A = 2 + 11t, B = 1 – 3t, t ,
A ≥ B and B ≥ 1 implies that t = 0 is the unique permitted values of t, so (2,1) is the unique desired
solution for (A,B). Thus A2 + B2 = 5.
68. A dragonfly has six feet and a spider has 8 feet. Given that a certain group of dragonflies and spiders have in
total 46 feet, find the number of dragonflies and the number of spiders.
Sol. Let x and y be the numbers of dragonflies and spiders respectively. Then
6x + 8y = 45 or 3x + 4y = 23
It is clear that x ≠ 0 and y ≠ 0 since 46 is neither divisible by 6 nor by 8.
4y < 23 implies y ≤ 5,
so corresponding to y = 1,2,3,4,5,6 the equation gives
3 − 4y
x=
3
Can be positive integer at y = 2 or y = 5 only x = 5 if y = 2 and x = 1 at y = 5.
NUMBER THEORY 32
So the answer is that 5 dragonflies and 2 spiders or one dragonfly and 5 spiders
69. If a four digit number and the sum of its all digits have a sum 2006, find the four digit number.
Sol. Let the four digit number be abcd = 1000a + 100b + 10c + d
Then 1001a + 101b + 11c + 2d = 2006
Which implies that a = 1 or a = 2
For a = 1,
⇒101b + 11c + 2d = 1005.
Since 101 × 8 + 11 × 9 + 2 × 9 = 925 < 1005,
Therefore b = 9, so 11c + 2d = 96 . 11 × 7 + 2 × 9 = 95 < 96 and c < 9 then gives c = 8,
So 2d = 8 ie. D = 4
Thus, the four digit number is 1984.
For a = 2
101b + 11c + 2d = 4.
b=c=0&d=2
Thus, the four digit number is 2002.
70. (Ancient Question) In an ancient chicken market, each rooster is sold for 5 coins, each hen for 3 coins and
each chick for 1/3 coins. Someone has 100 coins to buy 100 chickens, how many roosters, hens and chicks
can a man purchase out of a total cost of 100 coins?
Sol. Let the numbers of roosters, hens and chicks that the buyer bought be x, y, z respectively then
1
5x + 3y + z = 100
3
x + y + z = 100
Or
15 x + 9y + z = 300, (i)
x+y+z = 100 (ii)
(i) – (ii) yields
14x + 8y = 200 or, equivalently, 7x+ 4y = 100 (v)
It has special solution x0 = –100, y0 = 200,
So the general solution for (x, y) is x = –100 + 4t,
y = 200 –7t, where t is any integer.
The equation (v) indicates that 4 | x, so x maybe 0, 4, 8, 12, 16, 20 only.
Correspondingly, t = 25, 26, 27, 28, 29, 30 only. Since y ≥ 0 implies
t ≤ 200/7 < 29, so t = 25,26,27,28, only i.e. y = 25, 18, 11, 4.
NUMBER THEORY 33
⇒ 3y2 ≡ 4mod(5)
But 3y2 ≡ 0, 2, 3mod(5)
No solution possible.
77. Solve for integer values of the variables: x2 – y2 = 1988
Sol. The answers are x = ±498, y = ±496 and x = ±78, y = ±64 (the signs can be chosen independently).
Rewrite the equation as follows : (x–y) (x+y) = 2x2x7x71 (the number 71 is prime). We can
temporarily assume that x and y are positive (later we can supply these numbers with arbitrary
signs). We have only two representations of the number 1988 as the product of two positive integers
of equal parity: 1988 = 2x994 and 1988 = 14x142.
Setting the factors x – y, x + y equal to these completes the solution.
78. (CHINA/2003)) Find the integer solutions of the equation 6xy + 4x – 9y – 7 = 0.
Sol. By factorization, 6xy + 4x – 9y – 6 = (2x – 3)(3y + 2), so the given equation becomes
(2x – 3)(3y + 2) = 1.
If 2x – 3 = 1 & 3y + 2 = 1, then y has no integer solution.
If 2x – 3 = –1 & 3y + 2 = –1, then x = 1, y = –1.
By checking, (1, –1) satisfies the original equation, so it is the unique solution for (x; y).
79. (KIEV/1962) Prove that the equation x2 + y2 = 3z2 has no integer solution (x; y; z) ≠ (0; 0; 0).
Sol First of all it can be shown that, if an integer solution (x; y; z) is not (0; 0; 0), then there must be
such an integer solution with (x; y) = 1.
Suppose that (x; y; z) ≠ (0; 0; 0) is an integer solution with (x; y) = d > 1, letting
x = dx1 , y = dy1 , with (x1 , y1 ) = 1 .
Then the original equation becomes d 2 ( x12 + y12 ) = 3z 2 ,so d 2 | 3z 2 . Since the indices of 3 in d 2 and z 2
are both even so (d2, 3) = 1 and d2 |z2, i.e. d| z. Let z = dz1, then x12 + y12 = 3z12 . Thus (x1, y1, z1) ≠ (0;
0; 0) is an integer solution of the given equation also, and x; y; z are relatively prime pair wise.
Hence, it suffices to show that the given equation has no non-zero integer solutions (x; y; z) with (x;
y) = 1.Suppose that (x; y; z) is such a solution, then x; y cannot be divisible by 3 and x2 + y2 2
(mod 3), a contradiction. Thus, the conclusion is proven.
NUMBER THEORY 35
1260
80. (CHINA/2003) Given that is a positive integer, where a is a positive integer. Find the value of a
a +a −6
2
Sol. a2 + a –6 = (a–2) (a+3) implies that (a-2) and (a+3) are both factors of 1260, and their difference
is 5. Since 1260 = 22 x 32 x 5 x 7, where the pairs of two factors with the difference 5 are
(1,6),(2,7),(4,9),(7,12) and (9,14). Thus
a –2 = 1,2,4,7,9 i.e. a = 3,4,6,9,11
81. (CHINA/2001) How many number of pairs (x; y) of two integers satisfy the equation x2 –y2 = 12?
Sol. The original equation yields (x – y) (x + y) = 12. Since x – y and x + y have the same parity, and
12 = 2 × 6 = (–2) × (–6), so there are four systems of simultaneous equations :
x − y = 2, x − y = 6, x − y = 2, x − y = −6,
x + y = 6, x + y = 2, x + y = 6, x + y = −2,
From which four solutions are obtained i.e. (4, 2): (4,–2) ; (–4,–2) and (–4,2).
82. (SSSMO(J)/2004) Let x; y; z and w represent four distinct positive integers such that
Therefore one of m and n is divisible by p. Without loss of generality, we assume that p |m.
Then m = kp for some integer k.
(i) Yields n = (1–k)p. then
(ii) Yields (k –1) kp2 = 580 p, i.e. (k–1) kp = 580 = 4 × 5 × 29.
Thus p = 29
87. (CHINA/1993) The number of positive integer solutions (x, y, z) for the system of simultaneous equations
xy + xz = 255
is:
xy + yz = 31
(A) 3; (B) 2; (C) 1; (D) 0.
Sol. The second equation leads to y = 1, x + z = 31 at once.
By substituting them into the first equation it follows that
x(1+31 - x) = 225
x2 – 32x + 255 = 0,
(x–15) (x –17) = 0
x1 = 15, x2 = 17
Thus the solutions are x = 15, y = 1, z = 16 and x = 17, y = 1, z = 14. The answer is (B)
⇒n=20+30 x 2+210r
n=80+210r
min. n = 80
89. (CHINA/2002) When a positive integer n is divided by 5, 7, 9, 11, the remainders are 1, 2, 3, 4 respectively.
Find the minimum value of n.
Sol. Let n be the solution n 1 (mod 5) implies n = 5k + 1 for some non-negative integer k ;
Then n 2 (mod7) implies 5k 1 (mod 7), so minimum k is 3, i.e. n = 16 is the minimum n
satisfying the first two equations.
Then n = 16 + 35m is the general form of n.
The requirement n 3 (mod 9)
⇒ 16 + 35m 3 (mod 9) and
Its minimum solution is m = 4, so n = 156 + 315p, for some p
Finally, from the fourth requirement n 4 (mood11), we obtain 2 + 315 p 4(mod 11), so 7p 2
(mod 11), i.e. p = 5 Thus,
N = 156 + 315 × 5 = 1731
90. Prove that the number 30239 + 23930 is not prime.
Sol. 30239 + 23930 ≡(-1)239 + 1 ≡ 0(mod31)
Number divisible by 31 so not prime.
91. Let p be a prime number and suppose a and b are arbitrary integers. Prove that (a + b)p ≡ ap + bp (mod p)
Sol. (a + b)p (a + b) ap + bp ( mod p)
92. Let p and q be different primes. Prove that pq + qp ≡ p + q (mod pq)
Sol pq ≡ p (mod q) & pq ≡ 0 (mod p)
⇒ pq ≡ p (mod pq)……(i)
qp ≡ q (mod p) & qp ≡ 0 (mod q)
⇒ qp ≡ q (mod pq)……(ii)
Adding (i) & (ii)
pq + qp ≡ p + q (mod pq)
pq + q p
93. Let p and q be different primes, Prove that is even if p, q ≠ 2, where [x] denotes the integral part of
pq
x.
Sol. From previous question pq + qp ≡ p + q (mod pq)
⇒ pq + qp - p – q = kpq
NUMBER THEORY 39
94. Let p be prime, and suppose p does not divide some number a. Prove that there exists a natural number b such
that ab 1 (mod p).
Sol. Let us set b = ap-2.
Then , ab = ap–1 1 (mod p)
n −3
95. Show that r ( r )! is divisible by n if and only if n is prime.
r =1
n −3 n −3 n −3
Sol. r ( r )! = (r + 1 −1) ( r )! = ( r + 1)! − (r)! = (n − 2)!−1
r =1 r =1 r =1
p | ( a p −1 − b p −1 ) .
Base System
103. Prove that (5236)9 is divisible by 10
Sol: Method1: (5236)9 = 5x93 + 2x92 + 3x9 + 6 ≡ –5 + 2 – 3 + 6(mod10)
≡ 0(mod10)
Divisible by 10.
Method 2: 5 - 3 + 2 - 6 = 0 which is divisible by 10. Hence, the given number is
divisible by 10.
104. The number (2324a1013)7 is converted to base 10 and then divided by 6. It leaves no remainder. What could
be the value of a?
(a) 0 (b) 1 (c) 2 (d) 3
Ans (c)
Sol. (2324a1013)7 divisible by 6, if sum of digits divisible by 6
2 + 3 + 2 + 4 + a + 1 + 0 + 1 + 3 = 16 + a divisible by 6
a=2
105. Find the fourth root of (14641)9
(a) 109 (b) 119 (c) 129 (d) 139
Ans: (b)
Sol: (14641)9 = 1*94+ 4*93 + 6*92+ 4*91+ 1*90
= (9+1)4 = 104 (Using binomial theorem)
Therefore, the fourth root is 1010 = 119
106. How many 4-digit numbers in base 9 are perfect squares?
(a) 51 (b) 52 (c) 53 (d) 54
Ans: (d)
Sol: First we need to know the range of 4-digit numbers in base 9
Least 4 digit number possible= (1000)9 = 93 =729
Highest 4 digit number possible= (8888)9 = 94-1= 6560
From 729 to 6560, the squares vary from 272 to 802 .
Number of perfect squares present= 80-26=54.
NUMBER THEORY 42
107. In a number system 4 x 6 = 30 and 5 x 6 = 36, then the value of 3 x 4 x 5 in the same number system is
(a) 60 (b) 66 (c) 74 (d) 76
Ans: (c)
Sol: Let base = b
4b x 6b = 30b
2410 = 3b
⇒b=8
3b x 4b x 5b = 310 x 410 x 510 = 6010
From option 748 = 56 + 4 = 6010
108. A two digit number A in base 11 is one-third of the number formed by reversing its digits when considered in
base 19. How many such numbers are possible?
(a) 5 (b) 6 (c) 7 (d) 8
Ans: (a)
Sol: Let the number be xy.
1
(xy)11 = (yx)19
3
1
y + 11x = (x + 19y)
3
⇒ 3y + 33x = x + 19y
⇒ 32x = 16y
⇒ 2x = y ⇒ 5 such cases are possible
109. In a number system the product of 44b and 11b is 1034b. The number 3111b of this system, when converted to
the decimal number system, becomes?
(a) 406 (b) 1086 (c) 213 (d) 691
Ans: (a)
Sol: Let the base be b
(4b + 4)(b + 1) = b3 + 3b + 4
⇒ b3 – 4b2 – 5b = 0
⇒ b(b – 5)(b + 1) = 0
b=5
(3111)5 = (406)10
110. A three digit non-zero number ‘ABC in base 5, when converted to base 7, becomes ‘CBA’. Which of the
following is necessarily true ?
(a) A must be 2 (b) B must be 0
(c) C must be 2 (d) None of these
NUMBER THEORY 43
Ans: (b)
Sol: ABC5 = (25A + 5B + C)10
CBA7 = (49C + 7B + A)10
A.T.Q. 25A + 5B + C = 49C + 7B + A
24A – 2B – 48C = 0
12A = B + 24C
12(A – 2C) = B
⇒ B must be multiple of 12 but B < 5
⇒B=0
111. Let a, b, c be distinct digits. Consider a two-digit number ‘ab’ and a three-digit number ‘ccb’, both defined
under the usual decimal number system, if (ab)2 = ccb > 300, then the value of b is?
(a) 1 (b) 0 (c) 5 (d) 6
Ans: (a)
Sol: (ab)2 = ccb, the greatest possible value of ‘ab’ can be 31, since 312 = 961 (and since ccb > 300), 300
< ccb < 961, so 18 < ab < 31.
So the possible value of ab which satisfies (ab)2 = ccb is 21. So 212 = 441, ∴ a = 2, b = 1, c = 4.
112. The product of two numbers 231 and ABA is BA4AA in a certain base system (where base is less than 10),
where A and B are distinct digits. What is the base of that system?
(a) 5 (b) 6 (c) 7 (d) 8
Ans: (b)
Sol: 231 is a multiple of 11
Hence ,we can write (b+4+a) –2a = 0 or (k)+ 1 ( let’s take (k) +1 )
ie. b = k + a – 3
231 * aba = 2a(k)4 + (2b + 3a)(k)3 + (3a + 3b)(k)2 + (3a + b)(k) +a
now put b = k + a – 3 , in above equation
Compare it with ba4aa
We get , 2a+2 = b, 4a – 3 = a
solving them gives a= 1 , b = 4
Hence, k = b – a + 3 = 6
113. What will be the number of zeros in (2000!)34
Here 34 is the base in which the number is written
(a) 122 (b) 123 (c) 124 (d) 25
NUMBER THEORY 44
Ans: (b)
Sol: 34 = 17 * 2
So we have to find the highest power of 17 In 2000!. We need not find the power of 2 because power
of 2 will be greater than the power of 17. Thus the power of 17 will act as the limiting value.
Thus the highest power of 17 in 2000! is
[2000/17] + [ 2000/289] + [2000/4913], [] is greatest integer function = 117 + 6 + 0 = 123
Thus the required number of zeroes is 123.
114. In familiar decimal number system the base is 10, in another number system using base 4, the counting
proceeds as 1, 2, 3, 10, 11, 12, 13, 20, 21, …….The twentieth number in this system will be
(a) 40 (b) 320 (c) 210 (d) 110
Ans: (d)
Sol: In base 4 system, the digits can be 0, 1, 2, 3
So the counting proceeds as 1, 2, 3, 10, 11, 12, 13, 20, 21, 22, 23, 30, 31, 32, 33, 100, 101, 102, 103,
110 and so on..
Here twentieth term is 110.
115. In a certain number system 363 + 1056 = 1452. Find the value of of (654 – 456) in the same number system.
(a) 156 (b) 165 (c) 178 (d) 198
Ans: (b)
Sol: 363 + 1056 = 1419 in our number system. But according to the given number system, it is 33 more
than 1419 i.e. 1452.
So,
According to the same number system,
654 - 456 = 198 - 33 = 165
LEVEL II
1. The sum of two positive integers is 52 and their LCM is 168. Find the numbers.
Sol. Let the positive integers be a and b and a ≤ b.
Let d = (a, b) so that a = dm, b = dn and (m, n) = 1.
Thus (i) a + b = d(m+ n) = 52 = 4 × 13 and (ii) I.c.m. of a,b = dmn = 168 = 4 × 2 × 7 × 3.
But ((m + n)d, mnd) = d, since (m, n) = 1.
Hence by (i) and (ii), d = 4. So m + n = 13 and mn = 42.
Hence, m = 6,n = 7 and a = dm = 24, b = dn = 28.
2. An infinite sequence of positive integers (an) is such that for any two positive integers i j
⇒ 4 ≡ 2(mod6) contradiction
So this case not possible.
CASE 2: If possible, let p = 6k+5 and q = 6r+1and r = 6t+5
2q = p + r ⇒ 12r + 2 = 6(k + t) +10
12r + 2 ≡ 6(k + t) +10(mod6)
⇒ 2 ≡ 4(mod6) a contradiction
So this case not possible.
5. Prove that the number 100…00500..001 (100 zeros in each group) is not a perfect cube.
Sol. 100…00500..001 = 10202 + 5⨯10101 + 1 ≡ 6(mod9)
But cube of any number is of the form a3 ≡ 0, 1, 8(mod9).
⇒ Given number is not perfect cube.
6. Prove that the number 6n3 + 3 cannot be a perfect sixth power of an integer for any natural number n.
Sol. n3 ≡ 0, 1, 6(mod7)
6n3 + 3 ≡ 3, 2, 4(mod7)
But a6 ≡ 0, 1(mod7)
There given expression is not perfect sixth power of an integer.
7. If a nine-digit number is formed by the nine non-zero digits, and its unit digit is 5, prove that it must not be
perfect square.
Sol. We prove by contradiction. Suppose that the D = n2 satisfies all the requirements.
The unit’s digits of D is 5 implies that n is too.
Assume n = 10a + 5, then D = (10a + 5)2 = 100a (a + 1) + 25, so the last two digits of D are 25.
Since the last digit of a (a + 1) is 0,2 or 6 and 0,2 are impossible,
so the third digit of D is 6, ie. D = 1000b + 625 for some digit b.
Thus, 53| D, hence 54 | D since it’s a perfect square.
However, it implies that 54 | 1000K, so 5| k. i.e. k = 0 or 5, a contradiction.
8. For any n > 1 prove that the sum of any n consecutive odd natural numbers is a composite number
Sol. let the sum, 2a+1 + 2a+3 +…………+ 2a+2n-1=2an + n2 = n(n+2a)
9. Prove that if (n - 1)!+ 1 is divisible by n. then n is a prime number.
Sol. we prove this by contradiction.
Let n is composite number, implies that there is some natural number ‘a’ which divides n.
Clearly a < n ⇒ a|(n - 1)!, which is a contradiction.
10. Prove that there exists a natural number n such that the numbers n + 1, n+ 2, ...., n + 1989 are all composite
NUMBER THEORY 48
Sol. The number n+ 1 must be composite. Let us try to keep things simple and make this number divisible
by 2. Then the number n + 2 must he composite too, but it cannot he a multiple of 2. Let us try again
to be simple and make this number divisible by 3. Proceeding as above we can try to find a number n
such that n + 1 is divisible by 2, n + 2 is divisible by 3. n + 3 is divisible by 4, et cetera. This is
equivalent to saying that n - 1 is divisible by 2. 3. 4. and 1990. Such a number is easy to find; for
example, 1990! will do. Finally, we can take 1990! + 1 as the number we are looking for.
11. Prove that there are infinitely many prime numbers.
Sol. Assume that there are only n prime numbers, and let us denote them all by p1, p2..pn. Then the
number p1p2 . .pn + 1is divisible by none of the prime members p1, p2„ pn. Therefore, this natural
number cannot be represented as the product of primes, which is absurd. This contradiction
completes the proof
12. (a) If it is known that a + 1 is divisible by 3, prove that 4 +7a is also divisible by 3.
b) It is known that 2 + a and 35 – b are divisible by 11. Prove that a + b is also divisible by 11
Sol (a) 4 + 7a ≡ 1 + a(mod3)
(b) 2 + a ≡ 0(mod11) & 35 – b ≡ 0(mod11)
2 + a – 35 + b ≡ 0(mod11)
a + b ≡ 0(mod11)
7
13. Find the last digit of the number 7 7
Sol. The units digit of 7n has a cycle of length 4.
77 ≡ (-1)7 ≡ 3(mod4)
74m + 3 ⇒ 73 ⇒ 3
1414
14. Find the last two digits of 14
14
Sol First of all we find remainder of 1414 modulo 25.
142 = 196 –4 (mod 25) (14)5 (–4)2 .14 224 = –1 (mod 25)
So (14)10 1 (mod 25). On the other hand
142 = 196 6 (mod 10) 1414 67 6 (mod 10)
So 1414 = 10t + 6 for some positive integer t, hence
14 14
= (2 × 7)14 = 45t+3.710t+6 which is divisible by 4, so 1414 = 0 (mod 4)
14
Since 1414
25 K + 11 0 (mod 4)
K–10 (mod4)
K 1 (mod 4), i.e. K = 4m + 1 for some m∊N.
14
Thus the last two digits of 1414 are 36.
15. (SSSMO(J)/2001) Write down the last four digits of the number 7128
Sol. Here the recursive method is effective. Start from 74 = 2401, then
7 4 = 2401 2401 ( mod 10 4 )
p p + q q = ( p + q − q ) + q q ( −q ) + q q (mod p + q)
p p
− q q ( q 2 − 1) (mod p + q)
Let ‘a’ be a rational number. Show that if 11 + 11 11a + 1 is an odd integer, then it must be a perfect square.
2
18.
Sol. As 11 + 11 11a 2 + 1 is an odd integer, 11a2 + 1 must be the square of a rational number b of the form
b = c /11 where c is an integer.
NUMBER THEORY 50
Now 11a2 + 1 = c2/112, hence ‘a’ can have 11 in the denominator. Let a = d/11. Then 11d2 +112 = c2.
Hence 11 |c, i.e. b is an integer and 11a2 +1 = b2. Now
d2
11 2
+ 1 = b 2 i.e. d 2 = 11( b 2 − 1) , so that 11 |d. Hence ‘a’ is an integer.
11
If 11 + 11 11a 2 + 1 is an odd integer, then 11a2 + 1 must be the square of an even integer. Let
11a2 + 1 = 4m2, so that 11a2 = (2m –1) 2m+1)
Now (2m –1, 2m+1) = 1 hence, either 2m – 1 = 11e2 and 2m + 1 = f2 or 2m –1 = e2 and 2m
+ 1 = 11f2.
In the first case, f2 – 11e2 = 2 , so that f2 2 (mod 11) .
This is impossible, as the only squares (mod 11) are 1,3,4,5,9.
Hence 2m – 1 = e2 and 2m + 1 = 11f2 Hence
k =0
p −1 p −1
k =0 k =0
21. Prove that 103n+1 cannot be represented as a sum of the cubes of two integers.
Sol. 103n+1 ≡ (3)3n⨯3 ≡ -3 or 3(mod7)
but a3 + b3 ≡ 0, 1, 2, 5, 6(mod7)
⇒ 103n+1 cannot be represented as a sum of the cubes of two integers.
22. A three digit number was decreased by the sum of its digits. Then the same operation was carried out with the
resulting number, et cetera, 100 times in all. Prove that the final number is zero
Sol. Since after the first subtraction the result is divisible by9, all numbers we obtain in the process have
the sum of their digits no less than 9. Therefore, if the original number was not greater than 891 =
9⨯99 then the proof is now obvious.
For number greater than 891, we can prove this by using the fact that sum of digits of a three digit
number divisible by 9 can be 18 also. So there are enough numbers between having digits sum is 18
make the final number zero.
23. Let A be the sum of the digits of 44444444, and B the sum of the digits of A. Find the sum of the digits of B
44444444 (104 )
4444
Sol.
1017776
A < 177760
B<6×9
B < 59
Max (Sum of digits of B ) = 4 + 9 = 13
44444444 7 mod (9)
Sum of digit of B = 7 only possibility
24. Let a, b, c, d be distinct digits. Prove that cdcdcdcd is not divisible by aabb
(i) ( ) 2 ( mod p )
2p
p (ii) ( ) 2 ( mod p ) ,
2P
p
2
(iii) ( ) ( ) ( mod p ) ,
pa
pb
a
b (iv) ( ) ( )( mod p ) ,
pa
pb
a
b
2
Sol (i) ( 2p
p ) = ( 0 )( 0 ) + ( 1 )( 1 ) + ........... + ( p −1 )( p −1 ) + ( p )( p )
p p p p p p p p
⇒ ( ) ( )( ) + ( )( ) + ( )( ) 2(mod p)
2p
p
p
0
p
0
p
1
p
1
p
p
p
p
NUMBER THEORY 52
(ii) ( 2p
p ) = ( 0 )( 0 ) + ( 1 )( 1 ) + ........... + ( p −1 )( p −1 ) + ( p )( p )
p p p p p p p p
⇒ ( ) ( )( ) + ( )( ) + ( )( ) 2(mod p )
2p
p
p
0
p
0
p
1
p
1
p
p
p
p
2
26. (CHINA/1992) If x and y are positive integers, prove that the values of x2 + y + 1 and y2 + 4x + 3 cannot both
be perfect squares at the same time.
Sol. (i) When x y,
x 2 x 2 + y + 1 x 2 + x + 1 ( x + 1)
2
1 or minus 1, so corresponding to some value of t, the value of x must enter the interval [0,b–1].
When 0 x1 b − 1 then
There are three families of solution (1, a, –a), (b, 1, -b), (c, –c, 1), where a, b and c arbitrary integers.
And there are three more solutions (1, 2, 3), (2, 4, 4), (3, 3, 3).
32. x3 + 3 = 4y (y + 1)
Sol. Rewrite the equation as x3 = (2y–1) (2y+3).
(2y–1, 2y+3) = (2y–1, 2y+3 – 2y +1) = (2y–1, 4) =1
Factors on the right hand side are relatively prime.
⇒ 2y–1 = a3 and 2y+3 = b3
b3 - a3 = 4
b3 - a3 ≡ 4 (mod7)
Not possible as b3 - a3 ≡ 0, 1, 2, 5, 6(mod7)
There are no integer solutions.
33. x2 – 2y2 = 1(Pell’s equation )
Sol. First we will look for non negative solutions only.
One of these is easy to find : it is the pair (1,0) and we can generate all other solutions starting from
this one. More precisely, if the pair (a, b) is a solution to our equation then the pair (3a + 4b, 2a +
3b) is the next solution
1 1 1
34. (USSR) Solve, in integers, + = (find the formula for general solution)
x y z
Sol. It is easy to convert the given equation to the form
(x–z) (y–z) = z2
Let ‘t’ represent the greatest common divisor of the integers x, y and z ; that is x = x1 t, y = y1t, z =
z1t,
where x1, y1 and z1 are a relatively prime set. Further, let m = (x1, z1) and n = (y1, z1). That is we
write x1 = mx2.z1 = mz2 : y1 = ny2,z1 = nz2 where x2 and z2, y2 and z2 are relatively prime. The
integers m and n are relatively prime since x1, y1 and z1 y have no common divisor. Since z1 is
divisible both by m and by m, we may write, z1 = mnp
If we now substitute x = mx2t, y = ny2t, z = mnpt into the basic equation and divide the equality by
mnt2 , it follows that
(x2 – np)(y2 – mp) = mnp2
Notice that x2 is relatively prime to p, since m is the greatest common divisor of the numbers x1 =
mx2 and z1 = mnp; similarly, y2 and p are relatively prime . Upon expanding the left hand side of
NUMBER THEORY 55
equation, we see that x2y2 = x2mp + y2np is divisible by p. If follows that p = 1, and the equation
takes on the form
(x2 –n) (y2 – m) = mn
Now x2 is relatively prime to n for the three integers x1 = mx2, y1 = ny2,and z1 = mn are relatively
prime. Consequently, x2 – n is relatively prime to n, hence y2 – m is divisible by n. Similarly, x2 – n
is divisible by m. Thus, x2 – n = ±m, y2 – m = ± n ; x2 = ±y2 = ±m + n. Therefore, x = m(m+n)t, y =
±n(m+n)t, z = mnt, where m, n, t are arbitrary integers, that is the formula for general solution.
35. Find the last three digits of the 100th powers of the first 100 natural numbers
Sol. Let m be a natural number and r be the last digit of m. Then m = r + 10 k for some integer k. Hence
100 99 98
m100 = ( r + 10k ) = r100 + 100r 99 (10k ) + r (10k 2 ) + ...
100
r100 ( mod1000 )
(a) If r = 0, then r100 = 0.
(b) If r = 1,3,7,9, then r2 1 (mod 8), so r100 1 (mod 8). Also, (125) = 100
p2 + 11 15
x2 − x + ( p + q ) + 16 = 0 are p and q also. Find the values of p and q.
9 4
Sol Viete Theorem yields
p2 + 11
p+q = ......(i)
9
15
pq = ( p + q ) + 16......(ii)
4
Then p + q > 0 and pq> 0 from given equations, so p, q are both positive integers.
From (ii)
16pq – 60(p + q) = 162
NUMBER THEORY 56
Since a number with n ( n 4 ) digits must be not less than 10n–1 and the 4 times of the sum of its
39. Show that if x and y are positive integers such that x 2 + y2 − x is divisible by 2xy, then x is a perfect square.
prime, x and (k2 – 1) x + 1 both are perfect square numbers, so x is perfect square.
(i) Find the remainder of ( 25733 + 46 )
26
40. when it is divided by 50
27
(ii) Find the remainder of 4737 when it is divided by 11.
35 1 mod (11)
37 2 mod ( 5)
NUMBER THEORY 58
3727 3mod ( 5)
37 27 = 5m + 3
41. Prove that the product of the last digit of the number 2n and of the sum of all its digit but the last is divisible
by 3.
Sol. n = 4k, 4k +1, 4k + 2, 4k + 3
24k+1 → 2
24k+2 → 4
24k+3 → 8
24k → 6
(i) For n = 4k last digit is 6, divisible by 3.
(ii) For n = 4k + 1, 4k + 2, 4k + 3
2n (–1)n mod (3)
For n = 4k + 1
2n –1 mod (3)
2n – 2 0 mod (3)
Sum of digits of (2n – 2) = Sum of digits of 2n – unit digit
⇒ Sum of digits of 2n – unit digit divisible by 3.
(iii) For n = 4k + 2
2n 1 mod (3)
2n 4 mod (3)
2n –4 0 mod (3)
(iv) n = 4k+ 3
2n –1 mod (3)
2n 8 mod (3)
2n– 8 0 mod (3)
42. Prove that for any positive integer n, n4 + 2n3 + 2n2 + 2n + 1 is not a perfect square
Sol. n4 + 2n3 + n2 + 2n + 1
n2 (n + 1)2 + (n + 1)2 = (n + 1)2 (n2 + 1)
NUMBER THEORY 59
let n2 +1 = p2
p2 – n2 = 1
p + n = 1, p – n = 1
p = 1, n = 0 (contradiction)
OR
(n2 + n)2 < n4 + 2n3 + 2n2 +2n + 1< n4 + 2n3 + 3n2 + 2n + 1 = (n2 + n + 1)2
43. Show that if 2n + 1 and 3n + 1 are both perfect squares then 40|n.
Sol. Put 2n+ 1 = a2 and 3n + 1 = b2.
Since 2n + 1 is a perfect square then n is divisible by 4.
Hence , 3n + 1 1 (mod8).
Hence 8|n.
Since, the square of an integer is 0, 1, – 1 (mod 5).
We get 2n + 1 0, 1, –1 (mod 5) and 3n + 1 0, 1 – 1 (mod 5).
If 2n + 1 – 1 (mod5) then 3n + 1 3 (mod5), a contradiction.
Hence, 2n + 1 1 (mod 5) and 5 |n. Since (8,5) = 1 we get 40|n
44. Call a natural number n “convenient”, if n2+ 1 divisible by 1000001. Prove that among the number
1,2,……1000000 there are evenly many “convenient” numbers.
Sol. Let x2 –1 mod (106 + 1)
(106 + 1 –x)2 = (106 + 1)2 – 2 (106 + 1)x + x2 –1 mod (106 + 1)
if x is convenient then 1000001 - x is also convenient
45. The sum of the numbers a, b and c is divisible by 30. Prove that a5 + b5 + c5 is also divisible by 30.
Sol. x5 – x = (x-1)(x)(x+1)(x2 +1)
In three consecutive numbers, there is at least one number is multiple of 3 and one is multiple of 2
x = 5k, 5k+1, 5k+2, 5k+3, 5k+4
It can be easily observed that, for x = 5k, 5k+1 and 5k+4, (x-1)(x)(x+1)(x2 +1) divisible by 5.
For x = 5k+2 & 5k+3, x2 +1is divisible by 5.
⇒ x5 – x is divisible by 30.
⇒ a5 + b5 + c5 – a – b – c is divisible by 30.
Given a + b + c is divisible by 30 therefore a5 + b5 + c5 is also divisible by 30.
46. Prove that for each prime p the difference
111…11222…2233…33…88…88999…99 – 123456789 (in the first number each non-zero is
written exactly p times) is divisible by p.
NUMBER THEORY 60
By Fermat theorem: 10p 10 (mod p), 102p 102 (mod p), 108p 108 (mod p)
(10p − 1)(108p + 2 × 107p + ⋯ . +9) ≡ (10p − 1)(108 + 2 × 107 + ⋯ . +9)(modp)
≡ (10p − 1)(123456789)(modp)
9(111 … 11222 … 2233 … 33 … 88 … 88999 … 99– 123456789)
≡ (10p − 10)(123456789)(modp)
≡ 0 (modp) (by Fermat theorem)
As p is co-prime to 9 therefore given number is divisible by p.
LEVEL III
1. (USSR/1962) Prove that the only solution in integers of the equation x 2 + y2 + z2 = 2xyz is x = y = z = 0.
Sol. Since the sum of the squares is to be an even number, it may be reasoned that either all three of the
numbers x2, y2, z2 (hence also x, y, z) are even, or one of them is even and two are odd. But in the
last event, the sum would be divisible only by 2 and product 2xyz would be divisible by 4. Hence we
must conclude that x, y and z ,must all be even : x = 2x1, y = 2y1, z = 2z1. If we substitute these into
the given equation and divisible through by 4, we obtain
x 22 + y22 + z 22 = 23 x 2 y2 z 2
Which in turn implies that x2, y2 and z2 are all even numbers, also continuation of this process leads
to the conclusion that the following set of numbers is all even:
x, y, z
x y z
x1 = , y1 = , z1 = ;
2 2 2
x y z
x2 = , y3 = , z 2 = ;
4 4 2
x y z
x3 = , y3 = , z 3 = ;
8 8 8
NUMBER THEORY 61
x y z
xk = k
, yk = k , z k = k ;
2 2 2
k +1
(The numbers xk, yk, zk satisfy the equation x k + yk + z k = 2
2 2 2
x k yk z k ) .
But this possible only if x = y = z = 0.
2. (MOSCOW/1940) Find all three-digit numbers such that each is equal to the sum of the factorials of its own
digits.
Sol. Let abc = 100a + 10b + c be desired three digit number 7! = 5040 indicates that a, b, c ≤ 6, and
(SSSMO/2005) How many ordered pairs of integers (x; y) satisfy the equation x + y = 2 ( x + y ) + xy?
2 2
3.
Sol. By rewriting the equation in the form x2 – (2+y) x +y2 – 2y = 0, and considering it as a quadratic
equation in x (y is considered as a constant in its range), then the equation has integer solutions in x ,
so its Discriminant is a perfect square.
= ( 2 + y ) − 4 ( y 2 − 2y ) = 4 + 12y − 3y 2 = 16 − 3 ( y − 2 ) = n 2
2 2
16
For some integer n, it follows that ( y − 2 )2 ,so
3
4 4
−3 − 3 y−2 33
3 3
Thus, y maybe 0, 1, 2, 3, 4
When y = 0, then x2 – 2x = 0 so x = 0 or 2
When y = 1 or 3, then = 13 which is not a perfect square
When y = 2, then x2 – 4x = 0, so x = 0 or 4
When y = 4, then x2 – 6x + 8 = 0, so x = 2 or 4
Thus, there are a total of 6 desired pairs
NUMBER THEORY 62
4. (BMO/1991) Prove that the number 3n + 2 × 17n, where n is a non-negative integer, is never a perfect square.
Sol. It is needed to consider several possible cases as follows :
Let A = 3n + 12 × 17n
(i) When n = 4m where m is non-negative integer, then
3n + 2.17n = (34)m + 2(174)m = 81m + 2.83521m 3 (mod 10)
So A is not a perfect square
(ii) When n = 4m + 1 where m is non negative integer, then
3n + 2.17n = 3.81m + 34.83521m 7 (mod 10)
So A is not perfect square
(iii) When = 4m + 2 where m is a non negative integer, then
3n +2.17n = 9.81m + 578.83521m 7 (mod 10)
So A is not a perfect square
(iv) When n = 4m + 3 where m is non negative integer, then
3n + 2.17n = 27.81m + 9826.83521 3 (mod 10)
So A is not perfect square
Thus A is never a perfect square
5. (IMO/1986) Let d be any positive integer not equal to 2, 5, or 13. Show that one can find distinct a, b in the
set {2, 5, 13, d} such that ab – 1 is not a perfect square.
Sol. (IMO/1986) Let d be any positive integer not equal to 2, 5 or 13. Show that one can find distinct
a, b in the set {2, 5, 13, d} such that ab –1 is not a perfect square
Since 2.5 –1,2.13 –1 and 5.13 –1 are all perfect squares, it is necessary to show that at least one of 2d
–1, 5d –1 and 13d–1 is not a perfect square.
(i) When d is even , i.e. d = 2m for some positive integer m, then 2d –1 = 4m –1 is not a perfect
square (since its remainder modulo 4 is 3)
(ii) when d = 4m + 3 for some non negative integer m , then
5d –1 = 20m + 14 = 4 (5m + 3) + 2 2 (mod4)
So 5d – 1 is not a perfect square
(iii) When d = 4m + 1 for some non-negative integer m, then 5d –1 = 20m + 4 =4(5m+1), 13d –1 =
52m + 12 = 4 (13m + 3)
In case that m 1 or 2 (mod 4), then 5m + 1 2 or 3 (mod 4) implies that 5m + 1 is not a perfect
square, 5d –1 is not a perfect square.
NUMBER THEORY 63
In case that m 0 or 3 (mod 4), then 13m + 3 3 or 2 (mod 4) implies that 13m + 3 is not a perfect
square, 13d –1 is not a perfect square.
Thus, in any case at least one of three numbers 2d –12, 5d –1, 13d –1 is not a perfect square
6. (KIEV/1980) Multiply some natural number by 2 and then plus 1, and then carry out this operation on the
resultant number, and so on. After repeating 100 times of such operations, whether the resulting number is
divisible by (i) 1980? (ii) 1981?
Sol. (i) Since every time the number obtained after operation is always odd, so it cannot be divisible by
1980
(ii) Let the original natural number be x – 1. Then after the first operation the number becomes
2(x–1) + 1 = 2x –1
The number obtained after the second operation then is 2(2x–1) + 1 = 22 x–1
In general, if the number obtained after kth operation is 2k x –1, then the number obtained
Afte k + 1th operation is
2 ( 2k x − 1) + 1 = 2 k +1 x − 1
So the number obtained after 100 times of operations is 2100 x –1. Since (2100 ,1981) = 1, so the
Diophantine equation
2100x – 1981 y = 1
Must have integer solution (x0,y0), and its general solution is
x = x 0 + 1981t, y = y0 + 2100 t, t
Regardless of the size of |x0| and |y0| , it is always possible to let t0 be large enough, such that
x0 + 1981t0 > 0 and y = y0 + 2100 t0 > 0
Thus, is true that 2100 x –1 = 1981y for this solution (x,y) i.e. 1981| (2100 –1)
7. (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.
Sol. We see that a number is -safe if and only if the residue of is greater than and less
than ; thus, there are residues that a -safe number can have. Therefore, a
number satisfying the conditions of the problem can have different residues , different
residues , and different residues . The Chinese Remainder Theorem states
that for a number that is (mod b), (mod d), (mod f) has one solution if . For
NUMBER THEORY 64
example, in our case, the number can be: 3 (mod 7), 3 (mod 11), 7 (mod 13) so
since =1, there is 1 solution for n for this case of residues of . This means that by
the Chinese Remainder Theorem, can have different residues
mod . Thus, there are values of satisfying the conditions in the
range . However, we must now remove any values greater than that satisfy
the conditions. By checking residues, we easily see that the only such values are and ,
so there remain 958 values satisfying the conditions of the problem.
8. (AIME/1986) In a parlor game, the magician asks one of the participants to think of a three digit number abc
where a; b, and c represent digits in base 10 in the order indicated. The magician then asks this person to form
the numbers acb, bca, bac,cab and cba to add these five numbers, and to reveal their sum, N . If told the
value of N , the magician can identify the original number, abc . Play the role of the magician and determine
the abc if N = 3194.
Sol. Let S = N + abc = abc + acb + bca + bac + cab + cba , then
Sol. Instead of focusing on the pairs where the greatest common divisor is 1, we instead focus on the
opposite set: those pairs in which the two integers share a common factor. Note that by the definition
of greatest common divisor, x and y are both divisible by gcd(x, y). Therefore, the sum of these
integers must be divisible by gcd(x, y) as well. Since 2000 = 24 · 53, in order for gcd(x, y) to be
greater than 1, x and y must be both divisible by either 2 or 5 (or both).
We now proceed to count the number of unordered pairs of integers (x, y) that satisfy the above
condition. The pairs in which x and y are both divisible by 2 are (2, 1998),(4, 1996), . . . ,(1000,
1000). (By symmetry, we only need to go up to x = 1000, due to the condition that the pair (x, y) is
identical to the pair (y, x).) Similarly, the pairs in which x and y are both divisible by 5 are (5, 1995),
(10, 1990), . . . , (1000, 1000). However, if x and y are divisible by both 2 and 5, then the pair (x, y)
is counted in both lists, so we need to subtract those pairs once in order to not overcount. These pairs
are (10, 1990), (20, 1980), . . . , (1000, 1000). By simple counting arguments, we can determine that
there are 500, 200, and 100 pairs in the three lists respectively, for a total of 500 + 200 − 100 = 600
unordered pairs that satisfy the condition. Therefore, since there are 1000 possible unordered pairs, I
can submit at most 1000 − 600 = 400 entries in total.
10. Let [r, s] denote the least common multiple of positive integers r and s. Find the number ordered triples (a, b,
c) of positive integers for which [a, b] = 1000, [b, c] = 2000, and [c, a] =2000
Ans. 70
Sol. [a, b] = 23 53, [b, c] = 24 53, and [c, a] =24 53
As a and b cannot have 24, therefore c contain 24.
CASE 1. For c = 245n, 0 ≤ n ≤ 2
(I) a = 2m 53, 0 ≤ m ≤ 2 & b = 23 53
(II) a = 23 53 & b = a = 2m 53, 0 ≤ m ≤ 3
CASE 2. For c = 2453
(I) a = 2m5n, 0 ≤ m & n ≤ 2 & b = 23 53
(II) a = 23 53 & b = 2m5n, 0 ≤ m & n ≤ 3
(III) If a = 235n, 0 ≤ n ≤ 2 & b = 2m 53, 0 ≤ m ≤ 3
(IV) If a = 2m 53, 0 ≤ m ≤ 2 & b = 235n, 0 ≤ n ≤ 3
21+ 9 + 16 + 12 + 12 = 70
M2
Let a = 2m5n, b = 2p5q, c = 2r5s
ATQ. max.(m, p) = max.(n, q) = max.(s, q) = max.(n, s) = 3 and max.(p, r) = max.(m, r) = 4
NUMBER THEORY 66
n3 + 1
12. (IMO/1994) Determine all ordered pairs (m; n) of positive integers such that is an integer.
mn − 1
n3 + 1
(i) When n = m, then is an integer.
n2 −1
n3 + 1 n3 + 1 n 2 − n + 1 1
From = 2 = =n+
mn − 1 n − 1 n −1 n −1
Therefore n = 2,i.e n = m = 2 is a solution
(ii) When n ≠ m, since m3 and mn –1 are relatively prime and that
NUMBER THEORY 67
m3 ( n 3 + 1) ( mn )
− 1 m3 + 1
3
= +
mn − 1 mn − 1 mn − 1
m3 + 1
= ( mn ) + mn + 1 +
2
mn − 1
n3 + 1 m3 + 1
So and are either both integers or both non integers. Therefore, it suffices to
mn − 1 mn − 1
discuss the case m > n below.
n3 + 1 2
For n = 1, = is an integer, therefore m = 2 or 3
mn − 1 m − 1
n3 + 1
For n ≠ 2 , letting = k, then
mn − 1
n3 + 1 = k (mn–1)
1 k. (–1) (mod n)
k –1 (mod n),
n3 + 1
i.e. there exists a positive integer p such that = pn − 1
mn − 1
n3 + 1 n 2 − n + 1 1
pn − 1 = =n+
n −1
2
n −1 n −1
1
( p − 1) n 1 +
n −1
p = 1
n3 + 1
= n −1
mn − 1
n2 +1 2
m= = n +1+
n −1 n −1
i,e, n = 2 or 3, hence m = 5 for both cases
Thus, the solutions (m,n) are the pairs
(2,2), (2,1) (3,1), (5,2), (5,3), (1,2), (1,3) (2,5), (3,5)
NUMBER THEORY 68
Thus a, b, c are all even. Let a = 2a1 ,b = 2b1,c = 2c1 , this leads to the relation
a12 + b12 + c12 = 4a12 b12
Since 4a1 b1 = 0 (mod 4) and each a1 , b1 ,c1 has reminder 0 or 1 modulo 4, a1, b1, c1 must all be even
2 2 2 2 2
4x3 + 4x 2 y −15xy2 −18y3 −12x 2 + 6xy + 36y2 + 5x −10y = 0 find all positive integer solutions.
Sol. By factorization, the given equation can be factorized as follows :
( x − 2y ) ( 2x + 3y ) − 6 ( 2x + 3y ) + 5
2
=
= ( x − 2y )( 2x + 3y − 1)( 2x + 3y − 5 ) ,
So ( x − 2y )( 2x + 3y − 1)( 2x + 3y − 5 ) = 0
number r of the form r = abcdefgh having period 8, find the sum of all the elements of S.
Sol. Let us first count the number of elements in S. There are 108 ways of choosing a block of length 8.
Of these, we should not count the blocks of the form abcdabcd, abababab and aaaaaaaa. There are
104 blocks of the form abcdabcd. They include blocks of the form abababab and aaaaaaaa. Hence
the blocks of length exactly 8 is 108 – 104 = 99990000.
For each block abcdefgh consider the block a'b'c'd'e'f'g'h' where x' = 9 – x. Observe that whenever 0.
abcdefgh is in S. the rational number 0. a 'b'c'd 'e'f 'g 'h ' is also in S. Thus every element 0.
abcdefgh of S can be uniquely paired with a distinct element a 'b'c'd 'e'f 'g 'h ' of S. We also
observe that
10b2 − a 2
c= .
10a − b
If a, b, c are digits leading to a solution, and if d = gcd(a, b) then d/c. Consequently, we may
assume that gcd(a, b) = 1. Now
NUMBER THEORY 71
999a 2
c= − (10b + 100a ) ,
10a − b
showing that 10a – b divides 999a2. Since a, b are relatively prime, this is possible only if 10a – b is a
factor of 999. It follows that 10a – b takes the values 1, 3, 9, 27, 37. These values lead to the pairs
(a, b) = (l,9),(1, 7),(l, l),(4, 3).
We can discard the first two pairs as they lead to a value of c > 10. The third gives the trivial solution
(111,111,111). Taking d = 2,3,4,5,6,7,8,9, we get 9 solution:
(abc)10 = 111, 222,333, 444,555, 666, 777, 888, 099.
The last pair gives c = 2 and hence the solution (432,324, 243). Another solution is obtained on
multiplying by 2: (864,648,486).
Thus we have
(abc)10 = 111, 222, 333, 444, 555, 666, 777, 888, 999,432,864.
20. (2020 PRMO KV) If x and y are positive integers such that (x – 4)(x – 10) = 2y, find the maximum possible
value of x + y.
Ans. 16
Sol. (x – 4) (x – 10) = 2y
Let 2y = 2a .2b
(x – 4)(x – 10) = 2a .2b
Let x – 4 = 2a
x – 10 = 2b
Add
(2x – 14 = 2a + 2b) ...(i)
Subtract both
6 = 2a – 2b
a = 3, b = 1 (only value)
2x – 14 = 23 + 21
2x – 14 = 10
2x = 24
x = 12
2y = 2a .2b
2y = 23 21
NUMBER THEORY 72
2y = 24
y=4
x + y = 12 + 4=16
21. (2020 PRMO KV) Find the largest positive integer N such that the number of integers in the set
{1,2,3……..N} which are divisible by 3 is equal to the number of integers winch are divisible by 5 or 7 (or
both).
Ans. 65
Sol. {1,2,3.....N}
N
No. of integers divisible by 3 =
3
N
No. of integers divisible by 5 =
5
N
No. of integer divisible by 7 =
7
N
No. of integers divisible by 35 =
35
n(5 7) = n(5) + n(7) – n(5 7)
N N N
= + −
5 7 35
N N N N
Now, = = + −
3 5 7 35
N N N N
+ = +
35 3 5 7