NUMBER THEORY PROBLEMS
1. Find all n ∈ N such that 2n − 15 = x2 for some x ∈ Z.
2. Find all nonnegative integers (x, y) such that x2 + 3y and y 2 + 3x are both
perfect squares.
3. (Russia2001)Find all prime numbers p and q such that p + q = (p − q)3 .
4. Solve 3x − y 3 = 1 in nonnegative integers.
5. Solve px − y p = 1 in nonnegative integers, where p is prime.
6. Find all positive integers n for which n! + 5 is a perfect cube.
7. Prove that if 9 | x2 + xy + y 2 then 3 | x and 3 | y.
8. Prove that if the last digit of the number x2 + xy + y 2 is 0 (where x and
y are positive integers) then the last two digits of the number are zeros.
9. Let p be a prime of the form 3k + 2 that divides a2 + ab + b2 for some
integers a and b. Prove that p | a and p | b.
10. Find all pairs (x, y) of positive integers satisfying 3x − 2y = 7.
11. Find all triples (x, y, z) of nonnegative integers satisfying 5x 7y + 4 = 3z .
12. Prove that the equation 4xy − x − y = z 2 has no solution in positive
integers.
13. (Romania2003)Consider the primes p1 < p2 < · · · < p31 . Prove that if
30 | p41 + p42 + · · · + p431 then among these numbers one can find three
consecutive primes.
14. Prove that the equation x5 − y 2 = 4 has no solution in integers.
15. Prove that the equation x3 + y 4 = 7 has no solution in integers.
n
16. Show that 32 + 1 is divisible by 2 but not by 4.
17. Let x and y be positive integers such that xy | x2 + y 2 + 1. Show that
x2 +y 2 +1
xy = 3.
18. Show that for any positive integers a and b, (36a + b)(a + 36b) cannot be
a power of 2.
19. (IMO2005)Consider the sequence a1 , a2 , · · · defined by an = 2n +3n +6n −1
for all positive integers n. Determine all positive integers that are relatively
prime to every term of the sequence.
20. (IMO2006)Determine all pairs (x, y) of integers such that
1 + 2x + 22x+1 = y 2 .
1
21. Find all primes p and q such that pq | (5p − 2p )(5q − 2q ).
22. (Russia2000)Determine if there exist pairwise relatively prime numbers
a, b, and c with a, b, c > 1 such that
b | 2a + 1, c | 2b + 1, a | 2c + 1.
23. Prove that for every natural number m there exist a natural number n
such that 2m | n2 + 7.
24. (Japan99)Let f (x) = x3 + 17. Prove that for each natural number n ≥ 2,
there is a natural number x for which f (x) is divisible by 3n but not 3n+1 .
25. If a, b, m are positive integers with a > 1, then am + 1 | an + 1 =⇒ m | n.
26. (APMC2002)Find all triples (a, b, c) of positive integers such that 2c − 1
divides 2a + 2b + 1.
27. Determine (with proof) the greatest positive integer n > 1 such that the
system of equations
(x + 1)2 + y12 = (x + 2)2 + y22 = ... = (x + n)2 + yn2
has an integral solution (x, y1 , y2 , ..., yn ).
28. Find all pairs (m, n) of integers that satisfy the equation
4mn
(m − n)2 = .
m+n−1
29. Find all triples (x, k, n) of positive integers such that 3k − 1 = xn .
30. Find all distinct prime numbers p, q, r, s such that their sum is also prime
and both p2 + qs, p2 + qr are perfect squares.
31. Find all triples (m, n, p) such that pn + 144 = m2 where m, n are integers
and p prime.
32. (Belarussia 2007) Find all positive integers m, n satisfying n5 +n4 = 7m −1.
33. (Mathematical Reflections) Find all triples (n, k, p) where n and k are
positive integers and p is prime, satisfying the equation n5 + n4 + 1 = pk .
34. (Hungary2000/1) Find all primes p for which there exist positive integers
n, x, y such that pn = x3 + y 3 .
35. (Italy TST2003/1) Find all triples (a, b, p) with a, b positive integers and
p a prime such that 2a + pb = 19a .
36. Find all triples (a, b, c) of positive integers such that a2 + 2b+1 = 3c .
2
37. (Polish 2002/1)Find all natural numbers a, b, c such that a2 + 1 and b2 + 1
are primes and (a2 + 1)(b2 + 1) = c2 + 1.
38. Solve the equation 7x − 3y = 4 in the set of positive integers.
39. Solve 7x + x4 + 47 = y 2 in positive integers.
40. Determine all positive integers x, y, z satisfying x3 − y 3 = z 2 , where y is a
prime, z is not divisible by 3 and z is not divisible by y.
41. Determine all pairs (m, n) of positive integers for which 2m + 3n is square
of an integer.
42. Find all positive integers x, y, z, t, n satisfying nx + ny + nz = nt .
43. Find all triples (k, m, n) of nonnegative integers satisfying 5m + 7n = k 3 .
44. Find all triples (x, y, z) of positive integers satisfying (x + y)(1 + xy) = 2z .
45. (Poland 2008/1)Find the largest possible length of a sequence of consecu-
tive integers which are all expressible in the form x3 +2y 2 for some integers
x, y.
46. A sequence (an ) of integers is defined by a1 = 1, a2 = 2 and
an = 3an−1 + 5an−2 for n = 3, 4, 5, ...
Does there exist an integer k ≥ 2 for which ak divides ak+1 ak+2 .
47. Find all triples (p, q, r) of prime numbers for which pq + qr + rp and
p3 + q 3 + r3 − 2pqr are divisible by p + q + r.
48. Prove that if a, b, c, d are positive integers satisfying ad = b2 + bc + c2 , then
the number a2 + b2 + c2 + d2 is composite.
49. Find all pairs (k, m) of positive integers for which k 2 + 4m and m2 + 5k
are both perfect squares.
50. Find all positive integers k for which the number 3k + 5k is a power of an
integer with the exponent greater than 1.
51. Determine all nonnegative integers n for which 2n +105 is a perfect square.
52. A prime number p > 3 and positive integers a, b, c satisfy a + b + c = p + 1
and the number a3 + b3 + c3 − 1 is divisible by p. Show that at least one
of the numbers a, b, c is equal to 1.
53. Find all triples (x, y, n) of positive integers satisfying the equation
(x − y)n = xy.
3
54. Find all positive integers n for which nn + 1 and (2n)2n + 1 are prime
numbers.
55. Find all integers n > 1 for which 22 + 32 + · · · + n2 is a power of a prime.
56. Let k > 1 be an integer, and let m = 4k 2 − 5. Show that there exist
positive integers a and b such that the sequence (xn ) defined by
x0 = a, x1 = b, xn+2 = xn+1 + xn for n = 0, 1, 2, ... has all of its terms
relatively prime to m.
57. Determine whether there exists an infinite sequence a1 , a2 , ... of positive
1
integers satisfying a1n = an+1 1
+ an+2 for all n ∈ N.
√
58. Find all positive integers n which have exactly n positive divisors.
59. Decide whether there exist a prime p and nonnegative integers x, y, z such
that (12x + 5)(12y + 7) = pz .
60. A prime number p and integers x, y, z with 0 < x < y < z < p are given.
Show that if the numbers x3 , y 3 , z 3 give the same remainder when divided
by p, then x2 + y 2 + z 2 is divisible by x + y + z.
61. Show that for each prime p > 3 there exist integers x, y, k with 0 < 2k < p
such that kp + 3 = x2 + y 2 .
62. Find all pairs of positive integers x, y such that (x + y)2 − 2(xy)2 = 1.
63. Find all numbers p ≤ q ≤ r such that all the numbers
pq + r, pq + r2 , qr + p, qr + p2 , rp + q, rp + q 2
are prime.
64. Suppose that a and b are integers such that 2n a + b is a perfect square for
all n ∈ N. Show that a = 0.
such that the number p = 2k − 1 is prime. Prove
65. Let k, n > 1 be integers
that, if the number n2 − k2 is divisible by p, then it is divisible by p2 .
66. Prove that for all integers n ≥ 2 and all prime numbers p the number
p
np + pp is composite.
67. Prove or disprove that there is a function f : N → N such that for all
n∈N:
f (f (n)) = 2n.
68. Prove that, for every integer n ≥ 3, the sum of the cubes of all natural
numbers less than n and coprime with n is divisible by n.
69. Find all pairs (a, b) of positive integers such that the numbers a3 + 6ab + 1
and b3 + 6ab + 1 are cubes of positive integers.
4
70. Let m and n be positive integers such that mn | m2 + n2 + m. Prove that
m is a perfect square.
71. Suppose that x, y are real numbers such that x + y, x2 + y 2 , x3 + y 3 , and
x4 + y 4 are integers. Prove that xn + y n is an integer for all n ∈ N.
72. Determine all positive integers x, y satisfying y x = x50 .
73. Find all positive integers a, b, c, x, y, z with a ≥ b ≥ c and x ≥ y ≥ z which
satisfy
a + b + c = xyz, x + y + z = abc.
74. Find all pairs of integers (x, y) satisfying x2 + 3y 2 = 1998x.
75. Find all triples of positive integers with the property that the product of
any two of them gives the remainder 1 upon division by the third number.
76. Prove that an integer n ≥ 2 is composite if and only if there are positive
integers x, y, a, b with a + b = n and xa + yb = 1.
77. Determine all positive integers n and real numbers r such that the poly-
nomial 2x2 + 2x + 1 | (x + 1)n − r.
78. Find all integers x, y such that x2 (y − 1) + y 2 (x − 1) = 1.
x+1
79. Find all pairs (x, y) of natural numbers such that the numbers y and
y+1
x are natural.
80. Determine all triples (x, y, z) of positive rational numbers such that
1 1 1
x + y + z, + + , xyz
x y z
are all integers.
81. Prove that there are no integers a, b, c, d, not all equal to 0, such that
a2 − b = c2 and b2 − a = d2 .
82. Let p be a prime number. Prove that there exists n ∈ Z such that
p | n2 − n + 3 if and only if there exists m ∈ Z such that p | m2 − m + 25.
83. Let a, b, c be positive integers such that b | a3 , c | b3 , and a | c3 . Prove
that abc | (a + b + c)13 .
84. Prove that if 7 | 3x + 2 then 7 | 15x2 − 11x + 14.
85. Solve a3 + 2b3 = 4c3 in the set of integers.
86. Solve x3 + 3y 3 + 9z 3 − 9xyz = 0 in integers.
a2 +b2
87. (IMO88) Prove that if for positive integers a, b ab+1 is an integer, then
it is a perfect square.
5
88. Solve x2 − 5y 2 = 2 in the set of integers.
89. Solve x3 = 2y + 15 in the set of positive integers.
90. Solve x2 − 7y = 3 in the set of positive integers.
91. Solve x2 + y 2 + z 2 = 800000007 in the set of integers.
92. Find all triples (p, q, r) of distinct prime numbers having the following
property:
p | q + r, q | r + 2p, r | p + 3q.
93. Determine all pairs of integers (x, y) satisfying the equation
y(x + y) = x3 − 7x2 + 11x − 3.
94. Find all natural numbers n for which
n n n
+ + ··· +
1! 2! n!
is an integer.
95. Let n be a natural number. Prove that the number
n n
4 · 32 + 3 · 42
is divisible by 13 if and only if n is even.
96. Find all four-digit numbers abcd (in decimal system) such that
abcd = (ac + 1)(bd + 1).
97. Consider the sequence given by x1 = 2, xn+1 = 2x2n − 1 for n ≥ 1. Prove
that n and xn are coprime for each n ≥ 1.
98. Find all three-digit numbers n which are equal to the number formed by
three last digits of n2 .
99. Prove that for each prime number p and positive integer n, pn divides
n
p
− pn−1 .
p
100. Find all three-digit numbers which are equal to 34 times the sum of their
digits.
101. Prove that if n is a positive integer such that m = 5n + 3n + 1 is prime,
then n is divisible by 12.
102. Find all pairs (p, q) of prime numbers such that p divides 5q + 1 and q
divides 5p + 1.
6
103. Consider the equation x2001 = y x .
(a) Find all solutions (x, y) with x prime and y a positive integer.
(b) Find all solutions (x, y) in positive integers.
(Recall that 2001 = 3 · 23 · 29.)
104. A positive integer is called monotone if has at least two digits and all its
digits are nonzero and appear in a strictly increasing or strictly decreasing
order.
(a) Compute the sum of all monotone five-digit numbers.
(b) Find the number of final zeros in the least common multiple of all
monotone numbers (with any number of digits).
105. Determine all triples (x, y, z) of positive integers such that
13 1996 z
+ 2 = .
x2 y 1997
106. A positive integer is called special if all its decimal digits are equal and it
can be represented as the sum of squares of three consecutive odd integers.
(a) Find all 4-digit special numbers
(b) Are there 2000-digit special numbers?
107. Prove that for any prime number p the equation 2p + 3p = an has no
solution (a, n) in integers greater than 1.
108. Determine all triples (x, y, z) of integers greater than 1 with the property:
x | yz − 1, y | zx − 1, z | xy − 1.
2p−1 −1
109. Find all prime numbers p for which p is a perfect square.
110. Suppose that p, q are prime numbers such that
p p
p2 + 7pq + q 2 + p2 + 14pq + q 2
is an integer. Show that p = q.
111. Prove that the equation a2 + b2 = c2 + 3 has infinitely many integer
solutions (a, b, c).
112. Find all pairs of positive integers x, y such that x2 + 615 = 2y .
113. Find all integer solutions of the equation y 2 = x3 + 16.
√ √
114. Let a and b be integers. Prove that if 3 a + 3 b is a rational number, then
both a and b are perfect cubes.
7
115. Prove that no number of the form a3 + 3a2 + a, for a positive integer a, is
a perfect square.
116. Prove that, for any integer x, x2 + 5x + 16 is not divisible by 169.
117. Determine whether the equation x2 + xy + y 2 = 2 has a solution (x, y) in
rational numbers.
118. Show that all terms of the sequence 1, 11, 111, 1111, · · · in base 9 are tri-
angular numbers, i.e. of the form m(m+1)
2 for an integer m.
119. Show that for any positive integer n there exists an integer m > 1 such
that √ √ √
( 2 − 1)n = m − m − 1.
120. A natural number is palindromic if writing its (decimal) digits in the re-
verse order yields the same number. For instance, numbers 481184, 131
and 2 are palindromic. Find all pairs of positive integers (m, n) such that
· · · 1} · |11 {z
|11 {z · · · 1} is palindromic.
m n
121. Given positive integers a, c and an integer b, prove that there exists a
positive integer x such that
ax + x ≡ b (mod c).
122. Consider the sequence (an ) given by a0 = a1 = a2 = a3 = 1 and
an an−4 = an−1 an−3 + a2n−2 .
Prove that all its terms are integers.
123. Let b be an integer greater than 5. For each positive integer n, consider
the number
· · · 1} 22
xn = |11 {z · · · 2} 5
| {z
n−1 n
written in base b. Prove that the following condition holds if and only if
b = 10 : There exists a positive integer M such that for every integer n
greater than M, the number xn is a perfect square.
124. Determine the smallest prime number which divides x2 + 5x + 23 for some
integer x.
125. Let be given an integer a0 > 1. We define a sequence (an )n≥1 in the
following way. For every k ≥ 0, ak+1 is the least integer x > ak such that
(x, a0 a1 · · · ak ) = 1. Determine for which values of a0 are all the members
ak of the sequence primes or powers of primes.
126. Let f (n) be the least positive integer k such that n divides 1 + 2 + + k.
Prove that f (n) = 2n − 1 if and only if n is a power of 2.
8
127. Find all triples of prime numbers p1 , p2 , p3 such that
2p1 − p2 + 7p3 = 1826,
3p1 + 5p2 + 7p3 = 2007.
128. Find all positive integers k with the following property: There are four
distinct divisors k1 , k2 , k3 , k4 of k such that k divides k1 + k2 + k3 + k4 .
129. Find all triples (a, b, c) of positive integers such that abc + ab + c = a3 .
130. Find all positive integers n for which there exists prime numbers p, q with
q = p + 2 such that 2n + p and 2n + q are also prime.
131. Find all pairs (a, b) of positive integers with a > b such that
(a − b)ab = ab ba .
132. Find all pairs of integers (x, y) satisfying the equation
y 2 (x2 + y 2 − 2xy − x − y) = (x + y)2 (x − y).
133. Consider the equation c(ac + 1)2 = (5c + 2b)(2c + b), where a, b, c are
integers.
(a) Prove that if c is odd, then it is a perfect square.
(b) Is there a solution (in integers) with c even?
(c) Prove that the equation has infinitely many integer solutions.
134. Find all pairs of integers (x, y) satisfying 3xy − x − 2y = 8.
135. Find all pairs of integers (x, y) satisfying the equality
y(x2 + 36) + x(y 2 − 36) + y 2 (y − 12) = 0.
136. Find the number of pairs of positive integers (p, q) such that the roots of
the equation x2 − px − q = 0 do not exceed 10.
137. Find all pairs of positive integers (m, n) such that
(m − n)2 (n2 − m) = 4m2 n.
a
138. Find all positive integers a and b such that aa = bb .
139. (a) Find all positive integers n for which the equation (aa )n = bb has a
solution in positive integers a, b greater than 1.
(b) Find all positive integers a, b satisfying (aa )5 = bb .
140. A positive integer Ak · · · A1 A0 is called monotonic if Ak ≤ · · · ≤ A1 ≤ A0 .
Show that for any n ∈ N there is a monotonic perfect square with n digits.
9
141. Prove that every infinite arithmetic sequence a, a + d, a + 2d, ..., where
a, d ∈ N, contains an infinite geometric subsequence b, bq, bq 2 , ..., where
b, q ∈ N.
142. If n is a natural number, show that (n + 1)(n + 2) · · · (n + 10) is not a
perfect square.
143. Prove that there exist infinitely many positive integers n for which the
equation
(x + y + z)3 = n2 xyz
has a solution (x, y, z) in positive integers.
144. (a) Prove that for every positive integer n, the number of ordered pairs
(x, y) of integers satisfying x2 − xy + y 2 = n is divisible by 3.
(b) Find all ordered pairs of integers satisfying x2 − xy + y 2 = 727.
x
145. Find all integers x and prime numbers p satisfying x8 + 22 +2
= p.
146. Find all natural numbers n for which the number 2007 + n4 is a perfect
square.
147. Prove that if n is a positive integer, then the equation
1 1
x+y+ + = 3n
x y
has no solution in rational numbers x, y.
148. (a) Positive integers p, q, r, a satisfy pq = ra2 , where r is prime and p, q
are relatively prime. Prove that one of the numbers p, q is a perfect
square.
(b) Examine if the exists a prime p such that p(2p+1 − 1) is a perfect
square.
149. Prove that there are no positive integers a, b such that (15a + b)(a + 15b)
is a power of 3.
150. Find all prime numbers p such that 1 + p + p2 + p3 + p4 is a perfect square.
151. Find all positive integers n such that −54 + 55 + 5n is a perfect square.
Do the same for 24 + 27 + 2n .
152. Determine all positive integers x, y such that y | x2 + 1 and x2 | y 3 + 1.
153. Find all pairs of integers (x, y), such that
x2 − 2009y + 2y 2 = 0.
154. (Ukraine 2008)Let b, n > 1 be integers. Suppose that for each k > 1 there
exists an integer ak such that b − ank is divisible by k. Prove that b = An
for some integer A.
10
· · · 9} is divis-
155. (Estonia 2003/2)Let n be a positive integer. Prove that if |99 {z
n
ibile by n then 11 · · · 1} is divisible by n.
| {z
n
156. (Estonia 2005/3)Find all pairs (x, y) of positive integers satisfying the
equation
(x + y)x = xy .
157. (Estonia 2007/3)Let n be a natural number, n ≥ 2. Prove that if
bn − 1
= pk
b−1
where p is a prime, for some integer b, then n is prime.
158. Find all triples (x, y, z) of integers satisfying the equation
x3 + y 3 + z 3 − 3xyz = 2003.
159. Prove that there exists infinitely many positive integers such that
a3 + 1990b3 = c4 .
160. Find all 4-tuples (a, b, c, n) of naturals such that
na + nb = nc .
161. The sequence (an )n∈N is defined by a1 = 8, a2 = 18, an+2 = an+1 an . Find
all terms which are perfect squares.
162. Show that there exists infinite triples (x, y, z) ∈ N3 such that
x2 + y 2 + z 2 = 3xyz.
163. Let p(x) = x3 + 14x2 − 2x + 1. Let p(n) (x) denote p(p(n−1) (x)). Show
that there is an integer N such that p(N ) (x) − x is divisible by 101 for all
integers x.
164. Let s(n) be the sum of all positive divisors of n, so s(6) = 12. We say
n is almost perfect if s(n) = 2n − 1. Let mod (n, k) denote the residue
of n modulo k (in other words, the remainder of dividing n by k). Put
t(n) = mod (n, 1) + mod (n, 2) + · · · + mod (n, n). Show that n is
almost perfect if and only if t(n) = t(n − 1).
165. (Argentina TST-2009/1)Find all positive integers n such that
309 | 20n − 13n − 7n .
166. Find all prime numbers p and q such that p3 − q 5 = (p + q)2 .
11