Number Theory B Solutions
Number Theory B Solutions
Number Theory B Solutions
17! = 355687ab8096000
for some digits a and b. Find the two-digit number ab that is missing above.
Solution. 42. First note that the number is divisible by 11 as well as 9. We simply apply
the divisibility criteria for these two numbers, and immediately obtain two simultaneous linear
equations:
9|34 + a + b + 23
and
which give the following possibilities: (a + b) ∈ {6, 15} and (a − b) ∈ {−9, 2, 13}, where a and
b are digits. Now, a − b = −9 iff b = 9, a = 0, which does not satisfy any of the relations on
a + b. So, that possibility is eliminated. Furthermore, note that a + b and a − b added together
gives an even number 2a, so the parities of a + b and a − b must be equal. It follows that
either we have a + b = 6, a − b = 2, or a + b = 15, a − b = 13. Solving the first equation gives
1
(a, b) = (4, 2) and the second gives (a, b) = (14, 1), but since a and b are digits, it follows that
our required solution is 42.
4. Find the number of ordered pairs (a, b) of positive integers that are solutions of the following
equation:
a2 + b2 = ab(a + b)
.
Solution. 1. Suppose at first that a = b. Then we get 2a2 = 2a3 , which yields a = 0 or
a = 1. Since we must have positive integers, this yields a = b = 1 as a possible solution. Now
if a 6= b, then suppose WLOG that a > b. Then, the equation reduces to ab + ab = a + b. But,
1 > ab , and a + b ≥ a + 1, because we have positive integers only. Then, we get
a a b
+1> + =a+b≥a+1
b b a
i.e. ab > a, which means 1 > b, which is a contradiction. Note that we can divide throughout
freely by any of the two variables because they are positive integers.
5. Find the sum of all prime numbers p which satisfy
p = a4 + b4 + c4 − 3
61 = (x − y)(x2 + y 2 ) + (x − y − 1)xy
2
.
Then, if x − y ≥ 3, then we must have x ≥ 3 + y = 4, and 61 ≥ 3(x2 + y 2 ) + (x − y −
1)xy ≥ 3(x2 + y 2 ), so that x2 + y 2 ≤ 20, and then x = 4. Then, y = 1 or y = 2, but
x − y ≥ 3 =⇒ (x, y) = (4, 1), which does not satisfy the original equation.
If x − y = 2, then we get
61 = (x2 + y 2 ) = (y + 1)2 + y 2
solving which we easily get (x, y) = (6, 5), which is the unique solution.
7. Suppose that for some positive integer n, the first two digits of 5n and 2n are identical. Find
the number formed by these two digits.
Solution. 31. Suppose a is the number formed by the two digits. From the condition, we
must have 10k a < 2n < 10k (a + 1) and 10l a < 5n < 10l (a + 1) for some positive integers k and
l. Then, we can multiply these two equations together to obtain
Solution. 1111. Suppose n has k digits, that is 10k−1 ≤ n < 10k , then k ≤ s(n) by the
condition. Also, n2 < 102k , hence n2 has at most 2k digits, and so s(n2 ) ≤ 18k. Thus
2k ≤ 2s(n) = s(n2 ) ≤ 18k
which implies k ≤ 6, and so 2s(n) ≤ 18 × 6 or also s(n) ≤ 6. If s(n) = 6 then n is divisible by
3 so n2 and s(n2 ) = 2s(n) is divisible by 3, which is impossible. Hence 1 ≤ s(n) ≤ 5 and so
from the equation, the possible values of s(n2 ) are 2,4,8,16, or 32. But the remainder of s(n2 )
modulo 9 is the same as the remainder of n2 modulo 9, which can be only 0,1,4 or 7. Hence
s(n) is either 2 or 4, and the greatest number satisfying the conditions of the problem is 1111.