0% found this document useful (0 votes)
592 views

Number Theory - Assignment

1. This document contains 74 number theory problems across various topics including: divisibility, GCD and LCM, congruences, Diophantine equations, and perfect squares. The problems range from basic computations to proving more complex number theory statements. 2. Many problems involve finding values that satisfy certain number properties, such as finding integers that satisfy a given equation or finding prime numbers with specific characteristics. Other problems ask to prove number theory rules or statements. 3. The document covers foundational topics in number theory and provides a variety of problem types at different levels of difficulty to help teach and test number theory concepts.

Uploaded by

Arsh Dhawan
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
592 views

Number Theory - Assignment

1. This document contains 74 number theory problems across various topics including: divisibility, GCD and LCM, congruences, Diophantine equations, and perfect squares. The problems range from basic computations to proving more complex number theory statements. 2. Many problems involve finding values that satisfy certain number properties, such as finding integers that satisfy a given equation or finding prime numbers with specific characteristics. Other problems ask to prove number theory rules or statements. 3. The document covers foundational topics in number theory and provides a variety of problem types at different levels of difficulty to help teach and test number theory concepts.

Uploaded by

Arsh Dhawan
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 72

NUMBER THEORY ASSIGNMENT 1

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

(b) Given that p, 2p + 1, and 4p + 1 are prime numbers, find p.


14. Given the pair of prime numbers p and p2 + 2, prove that p3 + 2 is also a prime number.
15. Prove that the sum of the squares of five consecutive natural numbers cannot be a perfect square.
16. Prove that p2 – q2 is divisible by 24 if p and q are prime numbers greater than 3.
17. Find all integers which leave remainder 1 when divided by 3, remainder 2 when divided by 10
18. Find all primes p such that both p and p2 + 8 are primes

Units Digit & Last two digits


19. Last digit of 77777
20. What is the units digit of 31999  7 2000 17 2001 ?
(a) 1 (b) 3 (c) 5 (d) 7 (e) 9
21. Find the unit’s digit of the expression 256251 + 36528 + 7354
(a). 4 (b) 0 (c) 6 (d) 5
22. Find the remainder when the number 31989 is divided by 7.
23. Find the units digit of 3100
24. The unit’s digit in the expression 36234 33512. 39180 – 5429. 25123 31512 will be
(a)8 (b) 0 (c) 6 (d) 5
25. 1255/ 311 + 848/ 1618 will give which digit at unit’s place?
(a) 4 (b) 6 (c) 8 (d) 0
26. 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
27. Find last two digits of 6100 + 781.

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.

Perfect Square Numbers


53. In the following listed numbers, the one which must not be a perfect square is
(a) 3n 2 − 3n + 3 (b) 4n 2 + 4n + 4
(c) 5n 2 − 5n − 5 (d) 7n 2 − 7n + 7
(e) 11n 2 + 11n − 11
54. The last digit of the square of a natural number is 6. Prove that its next to last digit is odd.
55. The next to last digit of the square of a natural number is odd. Prove that its last digit is 6
56. Is it possible to write a perfect square using only the digits (a) 2,3,6; (b) 1,2,3 exactly 10 times each?
57. Can the sum of the digit of a perfect square be equal to 1970?
58. Is there a three digit number abc ( where a  c ) such that abc − cba is a perfect square?
59. Determine if there is a natural number k such that the sum of the two numbers
3k 2 + 3k − 4 and 7k 2 − 3k + 1 is a perfect square.
60. If (x – 1) (x + 3) (x–4) (x – 8) + m is a perfect square, then m is
(a) 32 (b) 24 (c) 98 (d) 196
61. If n + 20 and n – 21 are both perfect squares, where n is a natural number, find n.
62. Find the maximum integer x such that 427+ 41000 + 4x is a perfect square.
63. Prove that there is no three digit number abc , such that abc + bca + cab is a perfect square.
64. Prove that the equation a2 + b2 – 8c = 6 has no integer solution
NUMBER THEORY 5

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.

Some Important Theorems


87. Find the smallest multiple of 10 which has remainder 2 when divided by 3, and remainder 3 when
divided by 7.
88. (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.
89. Prove that the number 30239 + 23930 is not prime.
90. Let p be a prime number and suppose a and b are arbitrary integers. Prove that (a + b)p ≡ ap + bp
(mod p)
91. Let p and q be different primes. Prove that pq + qp ≡ p + q (mod pq)
 pq + q p 
92. Let p and q be different primes, Prove that   is even if p, q ≠ 2, where [x] denotes the
 pq 
integral part of x.
93. 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).
n −3
94. Show that  r ( r )! is divisible by n if and only if n is prime.
r =1

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

(a) 1 (b) 0 (c) 5 (d) 6


111. 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

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

115. If D = a2 + b2 + c2 where a and b are consecutive integers and c = ab, then D is :


(a) Always an even integer
(b) Always an odd integer
(c) Sometimes an odd integer, sometimes not
(d) Sometimes a rational number, sometimes not
116. If the number (33333)2 + 22222 is expressed as a single decimal number, then the sum of its digits is
(a) 10 (b) 15 (c) 20 (d) 25
NUMBER THEORY 9

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

gcd a i , a j = gcd i, j . Show that a i = i for alli

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

If a, b are integers, p a prime , then show that ( a + b )  a p + b p (mod p)


p
17.

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.

Find integer solution of 3  2 + 1 = n


rn 2
30.
31. 1/a+ 1 /b + 1/c = 1
32. x3 + 3 = 4y (y + 1)
33. x2 – 2y2 = 1(Pell’s equation )
1 1 1
34. (USSR) Solve, in integers, + = (find the formula for general solution)
x y z
35. Find the last three digits of the 100th powers of the first 100 natural numbers
36. (CHNMOL/2005) p, q are two integers, and the two roots of the equation in x
p2 + 11 15
x2 − x + ( p + q ) + 16 = 0 are p and q also. Find the values of p and q.
9 4
37. (CHNMO(P)/2002) A positive integer is called a “good number” if it is equal to four times of the
sum of its digits. Find the sum of all good numbers.
NUMBER THEORY 11

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

7. (a) P-1, (b) P2 – P 10. (a) 13. (a) 3 (b) 3

17. x = 22 +30 k; K  Z 18. 3 19. 7 20. E

21. b 22. 6 23. 1 24. C 25. D

26. 64 27. 83 28. E 29. (x, y) = (64,8), (8,64)

30. 104, 96 37. 4 38. 1 39. 1

40. 6, 2 41. n = 3k, Not possible 42. 88 44. No 47. A

49. 111……..11599125 50. 2970, 6975 51. Three hundred l's

53. B 56. No 57. No 58. No

59. Not possible 60. D 61. 421 62. 1972 65. C

66. 5 67. 5 dragonflies and 2 spiders or one dragonfly and 5 spiders

68. 1984, 2002 69. (0, 25, 75), (4, 18, 78), (8, 11, 81), (12, 4, 84)

70. x = −1 + 5k, y = 2 − 3k where k is any integer

71. x = x0 + 173k = 22 + 173k, y = y0 + 1990k= 253 + 1990k, where k is any integer

72. x = 16k –2, y = –7k + 1 73. No Solution 74. No Solution

75. No Solution 76. x = ±498, y = ±496 and x = ±78, y = ±64

77. x = 1, y = –1 79. a = 3,4,6,9,11 80. (4, 2): (4,–2) ; (–4,–2) and (–4,2) 81. 2187

82. x = 3, y = 1 83. 5 84. 5 85. p = 29 86. B 0

87. 80 88. 1731 100. 2 103. c 104. B


NUMBER THEORY 15

105. d 106. c 107. a 108. a 109. b

110. a 111. b 112. b 113. d

114. b 115. b 116. a

LEVEL II
1. 24, 28 3. 205 13. 3 14. 36

15. 6801 20. 11 23. 7

27. x = 667, y = 666, z = 665 30. n = 2, m = 1; n = 5, m = 3; n = 7, m = 4

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)

32. No Solution 33. (3a + 4b, 2a + 3b)

34. x = m(m+n)t, y = ±n(m+n)t, z = mnt, where m, n, t are arbitrary integers

35. 000,001,625 and 376 36. (p; q) is (13; 7). 37. 120

38. 170, 40 40. 29, 5

LEVEL III

2. 145 3. 6 6. No, Yes 7. 958

8. 358 9. 400 10. 70

12. (2,2), (2,1) (3,1), (5,2), (5,3), (1,2), (1,3) (2,5), (3,5)

13. a = b = c = 0 14. {(1,1)}  {(k,2k) :  k  } 15. 17

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

Sol. (a) 1, p, q, pq four divisors or 2 × 2 = 4


(b) 1, p, q, pq, p2 and p2q or 3 × 2 = 6
(c) 1, p, q, pq, p2, q2, p2q, q2p and p2q or 3 × 3 =9
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?
Sol. P can take values

P = 243251 , 233251 , 243151 , 223251, 2432 , 233151


g.c.d = 22  31 = 12
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?
Sol. 30 → 21  31  51
7 2 → 23  32
N → 51  31  22 = 60
5. Find all solutions in natural numbers of the equations : x2 - y2 = 303.
Sol (x–y) (x+y) = 3 x 101
x + y = 101
x–y = 3
x = 52
y = 49
or
NUMBER THEORY 17

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.

Sol. (a) P–1


P2
(b) No. of divisors up to P 2 = =P
P
Required No.s = P2 – P
8. The numbers a and b satisfy the equation 56a = 65b. Prove that a + b is composite.
Sol. 7  8  a = 13  5  b
NUMBER THEORY 18

a = 65m & b = 56m

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

then in all combinations (z–x) (z+x) is a multiple of 3. Therefore y contain 3


12. Prove that n5 + 4n is divisible by 5 for any integer n.
Sol. n5 – n + 5n
n(n2 –1) (n2 + 1) + 5n
(n–1)n (n+1) (n2 + 1) + 5n
(n–1) n (n+1) (n2 + 1) must be divisible by 5.
(n–1) (n) (n+1) (n2 –4 +5)
(n–2) (n–1) (n) (n+1) (n+2) + 5k
always divisible by 5
13. (a) Given that p, p + 10, and p + 14 are prime numbers,find p
(b) Given that p, 2p + 1, and 4p + 1 are prime numbers, find p.
Sol. (a) (i) If p = 2
P+10=12 not prime
(ii) If p = 3
P+10=13, p + 14 = 17 all prime
For p > 3, p can be 3k+1 or 3k+2
(iii) If p = 3k + 1
P+14= 3k+15 = 3m not prime
(iv) If p = 3k + 2
P+10= 3k+12 = 3m not prime
only for p=3, p+ 10 & p + 14 are prime.
(b) ) (i) If p = 2
2p + 1=5, 4p + 1=9 not prime
(ii) If p = 3
2p + 1=7, 4p + 1=13all prime
For p > 3, p can be 3k+1 or 3k+2
(iii) If p = 3k + 1
2P+1= 6k+3 = 3m not prime
(iv) If p = 3k + 2
4P+1= 12k+9 = 3m not prime
only for p=3, 2p+ 1 & 4p + 1 are prime.
14.
NUMBER THEORY 20

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

Units Digit & Last two digits


20. Last digit of 77777
Sol. 71 → 7
72 → 9
73 → 3
74→ 1
75 → 1
Cyclicity 4
777 → 4 × 194 + 1
Last digit is 7
21. What is the units digit of 31999  7 2000 17 2001 ?
(a) 1 (b) 3 (c) 5 (d) 7 (e) 9
Sol. 31 → 3, 32 → 9, 33 → 7, 34 → 1
39999 = (34)2499 × 33 = 7
71 → 7, 72 → 9, 75 → 3, 74 → 1
7 2000 → 1
17 2001 → 7 2001 → 7
39999  7 2000 17 2001 → 7 1 7 → 9
22. Find the unit’s digit of the expression 256251 + 36528 + 7354
(a). 4 (b) 0 (c) 6 (d) 5

Sol. U(256251 + 36528 + 735) = U(5 + 6 + 9) = 0

23. Find the remainder when the number 31989 is divided by 7.


Sol. Power Remainder

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

Sol. 32  −1mod (10 )

3100  1mod (10 )


25. The unit’s digit in the expression 36234 33512. 39180 – 5429. 25123 31512 will be
(a)8 (b) 0 (c) 6 (d) 5
Ans. c
26. 1255/ 311 + 848/ 1618 will give which digit at unit’s place?
(a) 4 (b) 6 (c) 8 (d) 0

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

(12345789)4  625  1 mod (8)


40. What is the remainder when 91990 is divided by 11?
Sol. 9  – 2 mod (11)
95  –32  1 mod (11)
91990  1 mod (11)
41. (i) Find the remainders when 250 and 4165 are divided by 7.
(ii) Find the remainder when 1373 + 143 is divided by 11.

Sol. (i) 23  1 mod (7)


250 = (23)16 ×22  4 mod (7)
4165  (–1)65  6 mod (7)
(ii) We note that 13  2 (mod 11)
1373  273 (25)14 23  (-1)148 (mod 11)  8(mod 11)
Thus 1373  8 (mod11) ..(1)

and 143 33 5 (mod 11) ..(2)


Adding the congruence’s (1) and (2), we get
1373 + 143  8 + 5  2 (mod11)
Hence 2 is the remainder when 1373 + 143 is divided by 11
42. (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.
Sol. n can be 3k, 3k+1 or 3k+2
(i) When n=3k,
2n = 23k  (1)k  1mod (7)
2n -1  0 mod (7)
Divisible for n=3k
(ii) When n=3k+1
2n = 23k+1  (1)k 2 2mod (7)
2n -1  1 mod (7) ⇒ not divisible
Similarly for n = 3k+2, not divisible
(b) n can be 3k, 3k+1 or 3k+2
 2n  1, 2, 4 mod (7)
NUMBER THEORY 26

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 )

 −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.

Sol. a1a 2 .......a n a n .....a 2a1

 a1 − a 2 + ..... + ( −1) a n + ( −1) a n + .. + ( −1) a 2 + ( −1) a1 mod (11)


n −1 n 2n − 2 2n −1

= 0 mod (11)

Perfect Square Numbers


54. In the following listed numbers, the one which must not be a perfect square is
(a) 3n 2 − 3n + 3 (b) 4n 2 + 4n + 4
(c) 5n 2 − 5n − 5 (d) 7n 2 − 7n + 7
(e) 11n 2 + 11n − 11
Sol. 3n 2 − 3n + 3 = 3 ( n 2 − n + 1) which is 32 when n = 2;

5n 2 − 5n − 5 = 5 ( n 2 − n − 1) = 52 when n = 3 ;

7n2 – 7n + 7 = 7 (n2 – n + 1) = 72 when n = 3;


NUMBER THEORY 29

11n2 + 11n – 11 = 11 (n2 + n – 1) = 112 when n = 3


Therefore (A), (C), (D) and (E) are all not the answer. On the other hand,

( 2n + 1) = 4n 2 + 4n + 1  4n 2 + 4n + 4  4n 2 + 8n + 4 = ( 2n + 2 )
2 2

Implies that 4n 2 + 4n + 4 is not a perfect square. Thus, the answer is (B).


55. The last digit of the square of a natural number is 6. Prove that its next to last digit is odd.
Sol. Since the last digit of its square is 6, the given natural number was even. The square of an even
number is divisible by 4. Hence, the number formed by its two last digits must be divisible by 4. It is
easy to write all two digit numbers which end with 6 and are multiples of 4: 16, 36, 56, 76, 96. All
their tens digits are odd
56. The next to last digit of the square of a natural number is odd. Prove that its last digit is 6

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 )

Not possible for square


(b) x 2  10 (1 + 2 + 3)  6 mod ( 9 )

Not possible for square


58. Can the sum of the digit of a perfect square be equal to 1970?
Sol. x2  1970  8 mod (9)
Not possible for square

59. Is there a three digit number abc ( where a  c ) such that abc − cba is a perfect square?

Sol. abc − cba = 99a − 99s = 99 ( a − c ) = 9 11( a − c )

For perfect square a – c must be multiple of 11 which is not possible.


60. Determine if there is a natural number k such that the sum of the two numbers

3k 2 + 3k − 4 and 7k 2 − 3k + 1 is a perfect square.


Sol. 3k2 + 3k –4 + 7k2 – 3k + 1
= 10k2 – 3  2 mod (5)
Not possible for square
NUMBER THEORY 30

OR 10k2–3 has unit digit 7, not possible for square


61. If (x – 1) (x + 3) (x–4) (x – 8) + m is a perfect square, then m is
(b) 32 (b) 24 (c) 98 (d) 196
Sol. (x –1) (x + 3) (x–4) (x–8) + m
(x–1) (x–4) (x + 3) (x –8) + m
(x2 – 5x + 4) (x2 – 5x –24) + m
x2 – 5x + 4 = t
t(t–28) + m
t2– 28t + m
(t–14)2 + m–196
For m = 196, it’s perfect square
62. If n + 20 and n – 21 are both perfect squares, where n is a natural number, find n.
Sol. n + 20 = b2
n – 21 = c2
41 = b2 – c2 = (b–c) (b+c)
b + c = 41 & b –c = 1
b = 21
n = 421
63. Find the maximum integer x such that 427+ 41000 + 4x is a perfect square
Sol. Since 427 + 41000 + 4x = 254 + 22000 + 22x = 254 (1+2.21945 + 22x –54), it is obvious that the right hand
is a perfect square if 22x –54 = (21945)2, i.e., x – 27 = 1945, x = 1972
When x >1972, then
(2x–27)2 = 22x – 54 < 1+2.21945 + 22x–54 < (2x–27 + 1)2,
So 1 + 2.21945 + 22x–54 is not a perfect square. Thus the maximal required value of x is 1972.

64. Prove that there is no three digit number abc , such that abc + bca + cab is a perfect square.

Sol. abc + bca + cab


= 111 (a + b + c)
= 3 × 37 (a + b + c)
a + b + c must contain 3 & 37
but a + b + c ≤ 27
 Not possible
NUMBER THEORY 31

65. Prove that the equation a2 + b2 – 8c = 6 has no integer solution


Sol. a2 + b2 – 8c = 6
a2 + b2 = 8c + 6
a2  0, 1, 4 mod (8)
b2  0, 1, 4 mod (8)
a2 + b2  0, 1, 4, 2, 5 mod (8)
 a2 + b2 ≠ 8c + 6

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

Thus x + y is 25,22,19,16, respectively so z = 75,78,81,84 correspondingly.


Thus, the solutions for (x, y, z) are (0, 25, 75), (4, 18, 78), (8, 11, 81), (12, 4, 84)
71. Solve the equation 3x + 5y = 7 in integers.
Sol. 3(-1) + 5 (2) = 7.
x = −1 + 5k
y = 2 − 3k
Where k is an arbitrary integer.
72. Solve the equation 1990x – 173y = 11 in integers.
Sol. The coefficients in the equation are large enough to make it difficult to find a particular solution.
However, it is not hard to see that the numbers 1990 and 173 are relatively prime, and this helps.
The greatest common divisor (gcd) of these numbers can be represented as 1990m – 173n for some
integers m and n
Euclid’s algorithm gives us m = 2, n = 23.
Hence x0 = 2x11 =22, y0 = 23x11 = 253 is a solution to the equation 1990 – 173y = 11
x = x0 + 173k = 22 + 173k,
y = y0 + 1990k= 253 + 1990k, where k is any integer
73. Find all integer roots of the equations 21x + 48y = 6.
Sol. 21x + 48y = 6 ⇒ 7x +16y = 2
The solutions are of the form {x = 16k –2, y = –7k + 1}, where k takes on all integer values
74. Find all integer roots of the equation x2 + y2 =4z – 1
Sol. It is clear that one cannot transform the equation to a more tractable type; it is also impossible to
analyze all the appropriate triples of integers. This new representative of our “Diophantine zoo” is
remarkable in that it has no integer solutions. Indeed, Which remainders can perfects squares give
when divided by 4? The choice of modulo 4 was determined by the form of the given equation).
The only possible remainders are 0 and 1. Since the sum of two such remainders cannot give
remainder –1, we have no solutions for this equation.
75. Solve for integer values of the variables: x3 + 21y2 + 5 = 0
Sol. Because x3 can be congruent modulo 7 only to 0, 1, -1 and x3 + 21y2+ 5 must be congruent modulo 7
to 5, 6 or 4 and, therefore, cannot be zero
76. Solve for integer values of the variables: 15x2 – 7y2 = 9
Sol. 15x2 – 7y2 ≡ 9mod(5)
⇒ 0 - 2y2 ≡ 4mod(5)
NUMBER THEORY 34

⇒ 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

x 2 − y2 = z 2 − w 2 = 81 . Find the value of xz + yw + xw + yz.


Sol. The given equations give (x–y) (x+y) = 34 and (z–w) (z+w) = 34 .
Since x –y < x + y and z –w < z + w
If two of the four numbers x –y, x + y, z –w, z + w have equal values, then the other two must be
equal also, and it must be the case that x –y = z –w and x + y = z + w, but then it implies that
y –w = x –z = w –y, i.e. y =w, a contradiction. Thus x –y, x + y, z –w, z + w must be four be four
distinct values and further they are the four distinct factors of 34 with x + y , z + w being the larger
two factors and x – y, z –w being the smaller two. Since 34 = 3 x 1 = 33 x 3, so
xz + yw + xw + yz = ( x+y) (z+w) = 34 .33 = 37 = 2187
15 3 2
83. (CHINA/2003) Find the number of non-zero integer solutions (x; y) to the equation 2
+ − =2
x y xy x
Sol. By eliminating the denominators, the given equation becomes
15 + 3x – 2xy = 2x2y
2x2 y– 3x + 2xy – 15 = 0,
(2xy –3) (x+1) = 12 = 1x12 = –1 × –12 = 3.4 = (–3) × (–4)
Since 2xy –3 is odd, hence there are four possible systems :
NUMBER THEORY 36

2xy − 3 = 1, 2xy − 3 = −1,


 
 x + 1 = 12,  x + 1 = −12,
2xy − 3 = 3, 2xy − 3 = −3,
 
 x + 1 = 4,  x + 1 = −4,
The first second and the fourth system have no integer solutions, the third system has the solution x =
3, y = 1. Thus there is exactly one integer solution x = 3, y = 1
x 14
84. CHINA/2001) Find the number of positive integer solutions to the equation + =3
3 y
Sol. Simplify the equation to the form xy + 42 = 9y, then
42
y=
9−x
y is a positive integer implies that 9 –x is a positive divisor of 42, so
9–x = 1, 2, 3, 6, 7, i.e. = 8, 7, 6, 3, 2
Correspondingly, y = 42, 21, 14, 7, 6.
By checking the give solutions satisfy the original equation, so the answer is 5.
2 3 1
85. (CHINA/2001) Find the number of positive integer solutions of the equation − =
x y 4
Sol. The given yields 8y –12x = xy, so xy + 12x –8y –96 = –96, i.e.
(x –8) (y + 12) = –96
Since y + 12 ≥ 13 and ––7 ≤ x – 8 < 0, there are give possible cases to be considered:
x − 8 = −1, x − 8 = −2,
 
 y + 12 = 96,  y + 12 = 48,  x − 8 = −3

x − 8 = −4 x − 8 = −6  y + 12 = 32
 
 y + 12 = 24,  y + 12 = 16,
From them five positive integer solutions are obtained easily:
(7, 84), (6, 36), (5, 20), (4, 12), (2, 4)
Thus the answer is 5
(SSSMO/2003) Let p be a positive prime number such that the equation x − px − 580p = 0 has two integer
2
86.
solutions. Find the value of p.
Sol. Suppose that the two integral roots of the given equation are m and n. Then by Viete Theorem,
m + n = p, (i)
mn =–580 p (ii)
NUMBER THEORY 37

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)

Some Important Theorems


88. Find the smallest multiple of 10 which has remainder 2 when divided by 3, and remainder 3 when divided by
7.
Sol. Form first condition; n=10k
Form 2nd condition; n ≡ 2mod(3)
10k ≡ 2mod(3)
k≡2mod(3)
min. k=2
⇒ n = 20 + 30m
From 3rd condition n ≡ 3mod(7)
20+30m≡3mod(7)
6+2m ≡ 3mod(7)
2m ≡ 4mod(7)
m ≡ 2mod(7)
Min. m=2
NUMBER THEORY 38

⇒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

p and q must be odd,


⇒ (pq + qp - p – q) must be even
⇒ k is even number
pq + qp = p + q + kpq
𝑝𝑞 + 𝑞 𝑝 𝑝+𝑞
= +𝑘
pq 𝑝𝑞
𝑝+𝑞
is a fraction and k is integral part which is even.
𝑝𝑞

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

ATQ if (n − 2)!− 1 , divisible by n.


(n − 2)!− 1  −(n − 1)!− 1  0(mod n)
(n − 1)!  −1(mod n) ⇒ n is prime by Wilson theorem.
96. 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
97. (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.
Sol. (a) the number 111 11 (p ones) is equal to (10p –1)/9. But 10p –1 is not divisible by p,
since 10p –1  10 –1 = 9 (mod p).
(b) The number 111 11 (p–1 ones) is equal to (10p-1 –1)/9. But 10p-1 –1 is divisible by p, since p is
relatively prime to both 10 and 9.
98.
10 10
( )
Show that, 11| 5 − 3 . More generally, if p is a prime such that p∤a and p∤b, then show that

p | ( a p −1 − b p −1 ) .

Sol. 510 – 310 ≡ 1 – 1 ≡ 0(mod11) (By Fermat theorem)


NUMBER THEORY 40

Similarly, ap-1 – bp-1 ≡ 1 – 1≡ 0(modp)


99. ( ) ( )
Prove that and (i) 7 | 111333 + 333111 (ii) 39 | 53103 + 10353 .

Sol. (i) 111333 + 333111 ≡ (-1)333 + (4)111(mod7)


43 ≡ 1(mod7) ⇒ 4111 ≡ 1(mod7)
111333 + 333111 ≡ -1 + 1 ≡ 0(mod7)
(ii) 53103 + 10353 ≡ (2)103 + (1)53(mod3)
≡ (4)51 ⨯ 2+ 1(mod3)
≡ (1)51 ⨯ 2+ 1 ≡ 0(mod3)
53103 + 10353 ≡ (1)103 + (-1)53(mod13)
≡ 1 – 1 ≡ 0(mod13)
⇒ 53103 + 10353 divisible by 39.
100. If p and q are distinct primes, show that pq-1 + qp-1  1 (mod pq)
Sol. pq-1 + qp-1 ≡ 1+0 (modq) & pq-1 + qp-1 ≡ 0+1 (modp)
pq-1 + qp-1 = kq +1 ≡ 1(modp), k ∊ Z
⇒ k = mp
⇒ pq-1 + qp-1 = 1 + mpq, k ∊ Z
⇒ pq-1 + qp-1  1 (mod pq)
101. Find the remainder when 7200 + 11800 is divided by 101.
Sol. 7100≡1mod(101) and 11100≡1(mod101)
7200≡1mod(101) and 11800≡1(mod101)
7200 + 11800≡2(mod101)
102. ( )
Show that 89 | 2 − 1 and 97| 2 − 1
44 48
( )
Sol. 26 ≡ -25(mod89)
⇒ 212 ≡ 625 ≡ 2(mod89)
⇒ 211 ≡ 1(mod89)
⇒ 244 ≡ 1(mod89)
26 ≡ -33(mod97)
⇒ 212 ≡ 1089 ≡ 22(mod97)
⇒ 224 ≡ 484≡ -1(mod97)
⇒ 248 ≡ 1(mod97)
NUMBER THEORY 41

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

116. If D = a2 + b2 + c2 where a and b are consecutive integers and c = ab, then D is


(a) Always an even integer
(b) Always an odd integer
(c) Sometimes an odd integer, sometimes not
(d) Sometimes a rational number, sometimes not
Ans: (b)
Sol: a and b are consecutive integers ⇒ b = a + 1 and c = ab
Thus, D = a2 + (a + 1)2 + (ab)2
⇒ D = a2 + a2 + 2a + 1 + (ab)2 = (ab)2 + 2a2 + 2a + 1
NUMBER THEORY 45

⇒ D = (ab)2 + 2a(a + 1) + 1 = (ab)2 + 2ab + 1


⇒ D = (ab + 1)2

⇒ D = ab + 1 is odd positive integer because ab is always even.


117. If the number (33333)2 + 22222 is expressed as a single decimal number, then the sum of its digits is
(a) 10 (b) 15 (c) 20 (d) 25
Ans: (a)
Sol: (33333)2 + 22222 = (3 x 11111)2 + 11111 x 2
= 11111(9 x 11111 + 2)
= 11111(99999 + 2)
= 11111(100000 + 1)
= 1111100000 + 11111 = 1111111111
So, Sum of digits = 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 = 10
NUMBER THEORY 46

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

gcd a i , a j = gcd i, j . Show that a i = i for alli

Sol. gcd(an, a2n) = gcd(n, 2n) = n


So n|an
If an > n for some n, let p be a prime such that pn|an.
Then pn|gcd(an, apn) = gcd(n, pn) = n, a contradiction.
 an = n
3. Find the least odd positive integer m such that (m + 164)(m2 + 1642) is a square number.
Sol. Note that m = 205 works. Assume that there exists a smaller m, If (m, 41) = 41, we check m = 41,
123, which fails.
If (m, 41) = 1, we have (m + 164, m2 + 1642) = 1. Therefore, both m + 164 and m2 + 1642 are square
numbers. Now (mod 3) gives that we need m + 164 ≠ 2 (mod 3), and m2 + 1642 ≠ 2 (mod 3). This
gives a contradiction. We are done.
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.
Sol. Prime number greater than 3, is of the form 6k+1 or 6k+5.
⇒ At least two of the primes of same form.
If p & q or q & r, of same form, then it is easily observed that d is divisible by 6.
Other cases:
CASE 1: If possible, let p = 6k+1, q = 6r+5 and r = 6t+1
2q = p + r ⇒ 12r + 10 = 6(k + t) +2
12r + 10 ≡ 6(k + t) +2(mod6)
NUMBER THEORY 47

⇒ 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

1414 = 1410t +6 = (1410 ) .145.14  (1)( −1)(14 )  11 (mod 25)


14 t

14 14
= (2 × 7)14 = 45t+3.710t+6 which is divisible by 4, so 1414 = 0 (mod 4)
14
Since 1414

1414 = 25K + 11 where K is a positive integer, then


14
NUMBER THEORY 49

25 K + 11  0 (mod 4)
K–10 (mod4)
K  1 (mod 4), i.e. K = 4m + 1 for some m∊N.

1414 = 25 (4m + 1) + 11 = 100m + 36


14

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 )

78 = ( 74 ) = ( 2400 + 1) = ( 2400 ) + 4800 + 1  4801 ( mod 10 4 )


2 2 2

716 = ( 4800 + 1) = 9601 ( mod 104 ) ,


2

732  ( 9600 + 1)  9201 ( mod104 ) ,


2

764  ( 9200 + 1)  8401 ( mod104 ) ,


2

7128  (8400 + 1)  6801 ( mod104 ) ,


2

Therefore the last four digits of 7128 is 6801


16. If p and q are primes such that p = q + 2, prove that pp + qq is a multiple of p + q
Sol. We not that as p and q are primes such that p = q + 2, both p and q are odd primes. Hence, q – 1 is
even. Consider

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)

Now p + q = 2q + 2 and 2|q –1. Hence p + q = 2 (q + 1) divides q2 –1.


Hence pp + qq  0 (mod p + q), that is pp + qq is a multiple of p + q.

If a, b are integers, p a prime , then show that ( a + b )  a + b (mod p)


p p p
17.

Sol. (𝑎 + 𝑏)𝑝 ≡ (𝑎 + 𝑏) ≡ (𝑎𝑝 + 𝑏 𝑝 )(𝑚𝑜𝑑𝑝)

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

11 + 11 11a 2 + 1 = 11 + 11( 2m ) = 11 + 11(11f 2 − 1) = (11f )


2

Which is 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
Sol If p = 2 then 22 + 32 = 13 is not a perfect power
p −1
Suppose that p is odd. Then 2p +3p = ( 2 + 3)  ( −1) 2p −1−k 3k
k

k =0

p −1 p −1

 ( −1) 2p −1−k 3k   ( −1) 2p −1−k (−2) k  p2p −1 (mod 5)


k k

k =0 k =0

For p ≠ 5, p2p−1 (mod5) ≢ 0(mod5)


p −1

 ( −1) 2p −1−k 3k not multiple of 5. Therefore 2p + 3p is not a perfect power.


k

k =0

For p = 5, 25 + 35 = 275 is not a perfect power.


20. Let f(m, n) = 36m – 5n, where m, n are natural numbers. Find the smallest value of |f(m,n)|. Justify your
answer.
Sol. We note that f(1,2) = 11. Further f(m, n) is odd, f(m, n) is not a multiple of
3 and f(m, n)  1 (mod 5). Thus only possible value less than 11 that |f(m,n)| can take is 1. We now
show that |f(m,n)| ≠ 1. Now
|f(m,n)| = 1  36m – 5n = ± 1  36m ± 1 = 5n
But modulo 5, 36m + 1 = 5n gives 2  0 (mod 5), a contradiction and going modulo 4, 36m–1
= 5n gives – 1  1 (mod 4), a contradiction. Thus, the smallest value of |f(m,n)| = 11
NUMBER THEORY 51

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

Sol. The number aabb is divisible by 11 while cdcdcd is not.


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

(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

As ( ) for r = 1, 2, ……, (p-1)is divisible by p.


p
r

⇒ ( )  ( )( ) + ( )( ) + ( )( )  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

As ( ) for r = 1, 2, ……, (p-1)is divisible by p.


p
r

⇒ ( )  ( )( ) + ( )( ) + ( )( )  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

So x2 + y + 1 is not a perfect square


(ii) When x < y, then y2 < y2 + 4x + 3 <y2 + 4y + 4 = (y + 2)2, so
y2 + 4x + 3 is not a perfect square if y2 + 4x + 3 ≠ (y + 1)2 .When
y2 + 4x + 3 = (y + 1)2 = y2 + 2y + 1
then y= 2x + 1, so that x2 + y + 1 = x2+ 2x + 2. However,
(x + 1)2 = x2 + 2x + 1 < x2 + 2x + 2 < x2 + 4x + 4 = (x + 2)2
Indicates that x2 + y + 1 = x2 + 2x + 2 is not a perfect square. Thus the conclusion is prove
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.
Sol. x > y > z ≥ 664 implies that z ≥ 664, y ≥ 665, x ≥ 666. Since 2x + 3y + 4z = 5992, y is
even i.e. y ≥ 666. Since 669 + 668 + 664 = 2001 > 1998, so y < 668, i.e. y = 666 hence
2x + 4z = 5992 –3 × 666 = 3994,
i.e. x + 2z = 1997. Therefore x is odd hence from the first equation z is also odd 664 < z <
666 implies z = 665, then x = 667. Thus the answer is x = 667, y = 666, z = 665.
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.
Sol. Let (x, y, z) be a solution with distinct components, for letting the solution satisfy the requirement
that any two components have a product which is divisible by the remaining component.
Let x = mn, y = nk, z = mk
where m, n, k are distinct positive integers. Then given equation yields
NUMBER THEORY 53

n(m–k) = 1– mk or equivalently, n(k–m) = mk –1


Now let k – m = 1, then n = mk –1 = m(m + 1) –1 = m2 + m –1,
So x = m ( m 2 + m − 1) , y = ( m 2 + m − 1) ( m + 1) , z = m ( m + 1)

Where m is any natrual nuber. The conclusion is proven


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.
Sol. The general solution of the given equation is
x = x0 + bt, y = y0 – at, t
Where (x0,y0) is a special solution. We claim that there must be a solution (x1,y1)
with 0 ≤ x1 ≤ b –1
The conclusion is true if x0  [0,b–1] Otherwise x 0  −1 or x 0  b Since x plus b or minus b as t plus

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

by1 = c − ax1  ab − a − b − ax1  ab − a − b − a ( b − 1) = −b

So that y1  −1, i.e.y1  0 .

Thus (x1,y1) is a non negative integer solution. The conclusion is proven

Find integer solution of 3  2 + 1 = n


rn 2
30.

Sol Since n 2  1 (mod 3), it is clear that n is not divisible by 3. So n = 3k + 1 or n = 3k + 2. We


investigate each case.
(a) If n = 3k + 2, then 3⨯2m+1 = 9k2 +12k + 4. Simplifying, we get
2m = 3k2 + 4k + 1 = (3k + 1) (k + 1)
The only factors of a power of 2 are other powers of 2. Therefore, k + 1 and 3k + 1 are powers of 2.
The values k = 0 and k = 1 do fit and we have the solutions n = 2, m = 1 and n = 5, m = 3
respectively.
However, if k  2, then 4(k+1) > 3k+1 > 2(k+1). Thus inequality shows that k + 1 and 3k + 1
cannot be powers of 2 simultaneously.
(b) n = 3k + 1. Proceeding analogously we find one more root; n = 7, m = 4.
31. 1/a+ 1 /b + 1/c = 1
Sol If all numbers are positive at least one of them is not greater than 2 or they all are equal to 3. If one
of the numbers negative say, a is negative, then 1/b +1/c >1 and this means that either b or c is 1
NUMBER THEORY 54

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

By Euler’s theorem, as (r, 5) = 1, r100 1 (mod 125).


Hence, r100 1 (mod 1000).
(c) If r = 5 then r2 1(mod 8). Hence r100 1 (mod 8) and r100 0
(mod 125).
By Chinese remainder theorem, r100 376 (mod 1000).
Thus in the above 4 cases, the last 3 digit of m100 are 000,001,625 and 376 respectively.
36. (CHNMOL/2005) p, q are two integers, and the two roots of the equation in x

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

 (4p – 15)(4q – 15) = 256 + 225 = 481


Since 481 = 1 × 481 = 13 × 37 = (–1) × (–481) = (–13) × (–37), and 4p – 15 or 4q – 15
cannot be –37 or –481, so the pair (4p – 15; 4q – 15) has the following four possible cases:
(1; 481); (481; 1); (13; 37); (37; 37).
Corresponding to them, the pairs of (p; q) are (4; 124); (124; 4); (7; 13); (13; 7):
By checking, only the pair (13; 7) satisfies the original system: the equation becomes
x 2 − 20x + 91 = 0 and its roots are (13; 7). Thus, the solution for (p; q) is (13; 7).
37. (CHNMO(P)/2002) A positive integer is called a “good number” if it is equal to four times of the sum of its
digits. Find the sum of all good numbers.
Sol. If a one digit number ‘a’ is good number, then a = 4a, i.e. a = 0, so no one digit good number exists.
Let ab = 10a + b be a two digit good number, then 10a + b = 4(a + b) implies 2a = b, so there are four
good numbers 12, 24, 36, 48, and their sum is 120.
Three digit good number abc satisfies the equation 100a + 10b + c = 4(a + b + c), i.e. 96a + 6b – 3c =
0. Since 96a + 6b – 3c≥ 96 + 0 – 27 > 0 always so no solution for (a; b; c), i.e. no three digit good
number exists.

Since a number with n ( n  4 ) digits must be not less than 10n–1 and the 4 times of the sum of its

digits is not greater than 36n. For n ≥ 4,


10n −1 − 36n  36 (10 n −3 − n )  0,

So no n digit good number exists if n  4


Thus, the sum of all good numbers is 120.
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.
Sol. Let x and y be the numbers of pebbles in the piles (A) and (B) respectively. When z
pebbles are moved from (B) to (A), then the given conditions in question gives
2(x –100) = y + 100 gives y = 2x – 300
x + z = 6 (y – z)
So from it follows that 11x – 7z = 1800
⇒4x + 7(x – z) = 1800
Both sides taking modulo 4 yields 4 | (x – z), so x – z = 4t, t  .
NUMBER THEORY 57

Implies 4x + 28t = 1800 or x + 7t = 450.


Thus, the general solution for (x; y; z) is
x = 450 – 7t, y = 2 (450 –7t) – 300 = 600 –14t, z = (450 –7t) –4t = 450 –11t.
450
From x, y, z ≥ 0, it is obtained that t   41 , so t  40 . When t takes its maximum possible
11

value then x is its minimum, so x min = 450 − 280 = 170


In that case, y = 600 – 560 = 40, z = 450 – 440 = 10, so there are 40 pebbles in (B)

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.

Sol. From assumption, there exists integer k such that x2 + y2 – x = 2kxy.


Consider the quadratic equation in y
y2 – 2kxy + (x2 –x) = 0
Since it has an integer solution , so, by Viete Theorem, the other root is also an integer and the
Discriminant of the equation is perfect square. Hence
 = 4  k 2 x 2 − ( x 2 − x )  = 4x ( k 2 − 1) x + 1 is a perfect. Since x and (k – 1) x + 1 are relatively
z

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.

Sol. (i) 257  7 mod (50)


(257)33  733  (72)16 71  (–1)16 71  7mod (50)
(257)33 + 46  7 + 46  3 mod (50)
(25733 + 46)26  326 mod (50)
35  –7 mod (50)  310 = –1 mod (50)
326 = (310)2 × 36  1 x 29 mod (50)
37 27
(ii) 47

4737 = 337 (mod 11)


27 27

35  1 mod (11)

37  2 mod ( 5)
NUMBER THEORY 58

37 27  227  413  2  ( −1)  2  −2 mod ( 5 )


13

3727  3mod ( 5)

37 27 = 5m + 3

4737  35m +3  27  5 mod (11)


27

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

Sol. For p = 2 and p = 3, this can be easily proved.


For p > 3
1
111 … 11222 … 2233 … 33 … 88 … 88999 … 99 = (10p − 1)(108p + 2 × 107p + ⋯ . +9)
9

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

x12 + y12 + z12 = 4x1y1z1


As above, this equation implies that x1, y1 and z1 are all even numbers, and so can write
x1 = 2x2, y1= 2y2, z1 = 2z2, which yields the equation

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

further, if one of a, b, c is 6 then abc  6! = 720  one a, b, c is greater than 6,


So a, b, c  5 . Since 555  5!+ 5!+ 5! . So a, b, c cannot be all 5
On the other hand, 4! + 4! + 4! = 72 which is not a three digit number,
So at least one of a, b, c is 5.
abc  5!+ 5!+ 5! = 360 implies that a 3
When a = 1, then 145 = 1! + 4! + 5!, so 145 is a desired number
When a = 2, then b, c must be 5. But 255  2!+ 5!+ 5! , so no solution
When a = 3, then b, c must be 5. But 355  3!+ 5!+ 5! so no solution.
Thus, 145 is the unique solution.

(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 33
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

S = (100a + 10b + c ) + (100a + 10c + b )(100b + 10a + c )

+ (100b + 10c + a ) + (100c + 10a + b ) + (100c + 10b + a ) = 222 ( a + b + c )

Implies 222 ( a + b + c ) = 3194 + abc

= 222 14 + 86 + abc.Hence.


(i) a + b + c  14;
(ii) 86 + abc is divisible by 222, i.e. abc + 86 = 222n for some positive integer n
1085
Since 222n  999 + 86 = 1085, so n   5 ,hence n may be one of 1,2,3,4
222
When n = 1 then abc = 222 – 86 = 136, the condition (i) is not satisfied
When n = 2 then abc = 444 – 86 = 358, the conditions (i) and (ii) are satisfied
When n = 3, then abc = 666 – 86 = 580, the condition (i) is not satisfied
When n = 4 then abc = 888 – 86 = 802, the condition (i) not satisfied
Thus , abc = 358
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 65

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

From above its clear that r = 4.


Either m = 3 ⇒ p = 0,1,2,3 or p = 3 ⇒ m = 0,1,2
Total 7 combinations.
Either n = q = 3 ⇒ s = 0,1,2,3
or s = q = 3 ⇒ n = 0,1,2
or s = n = 3 ⇒ q = 0,1,2
Total 10 combinations.
Total cases are 7⨯10 = 70
11. Given natural numbers x, y. and z such that x2 + y2 = z2. Prove that xy is divisible by 12.
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 .


d2 (x12 + y12) = z2
x12 + y12 = z12
Now we solve for (x, y) =1
Square of any natural number is of the form = 4k, 4k+1
Both x & y cannot of the form 4k, as both are co-prime.
Both x & y cannot of the form 4k + 1, as x2 + y2 = 4(k + m) + 2 cannot be equal to any square.
⇒ One is of form 4k and other is 4m + 1.
⇒ xy = (4k)(4m+1)…..(i)
Similarly xy = (3p)(3q+1)…..(ii)
⇒ xy is multiple of 12.

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

13. (USAMO/1975) Determine all integral solutions of a 2 + b 2 + c 2 = a 2 b 2


Sol Let (a; b; c) be an integer solution. We show that a; b and c must all be even by taking modulo 4 to
both sides of the equation. There are three possible cases to be considered:
Case 1: When a; b; c are all odd, then a 2 + b 2 + c2  3 (mod 4) whereas a2b21 (mod 4), so it is
impossible.
Case 2: When two of a; b; c are odd and the other is even, then a 2 + b 2 + c 2  2 (mod 4) , whereas
a2b2´ 0 or 1 (mod 4), so it is impossible also.
Case 3: When two of a; b; c are even and the other is odd, then a 2 + b 2 + c2  1 (mod 4), whereas a2b2´
 0 (mod4) so it is impossible also.

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

also. Then a1 = 2a2, b1 = 2b2.c1 = 2c2. This leads to relation

a 22 + b22 + c22 = 4a 22 b22


The process can be continued to any times, since we have the relation

a 2n + b2n + c2n = 4n a 2n b2n for any natural n.


a b c
Hence a n = n
, b n = n , c n = n are integers for any natural number n, i.e., a = b = c = 0
2 2 2
Thus, the equation has only zero solution.
Note: This example is one of Fermat’s method of infinite decent.
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.
Sol. By factorization, the given equation can be factorized as follows :

4x3 + 4x 2 y −15xy2 −18y3 −12x 2 + 6xy + 36y2 + 5x − 10y


= ( 4x 3 − 8x 2 y ) + (12x 2 − 24xy 2 ) + ( 9xy 2 − 18y3 ) − (12x 2 − 24xy )

− (18xy − 36y 2 ) + ( 5x − 10y )

= ( x − 2y ) ( 4x 2 + 12xy + 9y 2 − 12x − 18y + 5 )


NUMBER THEORY 69

( 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

x – 2y = 0 yields the positive integer solutions (k,2k), k  


2x + 3y –1 = 0 has no positive integer solution
2x + 3y –5 = 0 has only one positive integer solution (1,1)
Thus, the solution set is {(1,1)}  {(k,2k) :  k  }
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.
Sol. We write the given condition as
n3 + (–2S(n))3 + (–1)3 = 3  n  (–2S(n))  (–1).
This is in the form x3 + y3 + z3 = 3xyz. We know that this can happen if and only if x + y + z =
0.Thus we obtain a simpler condition
n – 2S(n) –1 = 0.
Again we know that n – S(n) is divisible by 9. Hence 9 should divide S(n) + 1. It is easy to see that
the number of digits in n cannot be more than 2. For a three digit number maximum value of S(n)
can be 27 and 25(n) + 1  55. Hence n is either a 1-digit number or a two digit number. Hence S(n) 
18. Since 9 divides 5(n) + 1. we can have S(n) = 8 or S(n) = 17. But then n = 17 or n = 35. Among
these n = 17 works but not 35. (S(35) = 8 and 2S(n) + 1 = 17  35.) Hence the only solution is n =
17.
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?
Sol. Let S(n) be the sum of the digits of n. Then n  S{n) (mod 9). For any admissible n we observe that
10  S(n)  14 and hence there is no value of S(n) that is a multiple of 9. So no such n exists.
17. (RMO 2015) Find all integers a, b, c such that a2 = bc + 1, b2 = ca + 1.
Sol. Suppose a = b. Then we get one equation: a2 = ac + 1. This reduces to a(a – c) = 1. Therefore a = 1, a
– c = 1; and a = –1, a – c = –1. Thus we get(a, b, c) = (1, 1, 0) and (–1, –1,0).
subtracting the second relation from the first we get
a2 – b2 = c(b-a).This gives a + b = –c. Substituting this in the first equation, we get
a2 = b(–a –b) + l.
NUMBER THEORY 70

Thus a2 + b2 + ab = 1. Multiplication by 2 gives


(a + b)2 + a2 + b2 = 2.
Thus (a, b) = (1, –1), (–1,1), (1,0), (–1.0), (0,1), (0, –1). We get respectively c = 0, 0, –1,1, –1, 1.
Thus we get the triples:
(a, b, c) = (1,1,0), (–l, –1, 0), (l, –1,0), (–1, 1, 0), (1, 0, –l), (–1, 0, 1), (0, 1, –l), (0, –l, l).
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.
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

0. abcdefgh + 0. a 'b'c'd 'e'f 'g 'h ' = 0.99999999 = 1.


99990000
Hence the sum of elements in s is = 49995000
2
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.
Sol. Let its write
x = (a  l02) + (b  l0) + c, y = (b x l02) + (c  l0) + a, z = (c  102) + (a  10) + b.
We are given that y2 = xz. This means
((b  102) + (c  10) + a)2 = ((a  102) + (b  10) + c) ((c  102) + (a  10) + b).
We can solve for c and get

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 

checking for certain values of N, will get N = 65 is the largest possibility


 N = 65

You might also like