Chapter 1 Arithmetic Problems 1.1 Reconstruction of division problems 1.1.1 AMM E1 This is Problem E1 of the AMERICAN MATHEMATICAL MONTHLY: x 7 ) Clearly, the last second digit of the quotient is 0. Let the divisor be the 3-digit number d. Consider the 3-digit number in the seventh line, which is a multiple of d. Its difference from the 4-digit number in the sixth line is a 2-digit number. This must be 9xx. This cannot be the same as the 3-digit number in the fifth line, since the difference between the 3-digit numbers in the fourth and fifth lines is a 3-digit number. Therefore, in the quotient, the digit after 7 is a larger one, which must be smaller than the first and the last digits, since these give 4-digit multiples of d. It follows that the quotient is 97809.
102 Arithmetic Problems Since 8d is a 3-digit number 9xx, the 4-digit number in the third and bottom lines is 9d =10xx or 11xx. From this 8d must be 99x, and therefore 992 = 8 124. 9 7 8 0 9 1 2 4) 1 2 1 2 8 3 1 6 1 1 1 6 9 6 8 8 6 8 1 0 0 3 9 9 2 1 1 1 6 1 1 1 6
1.1 Reconstruction of division problems 103 1.1.2 AMM E10 This is Problem E10 of the MONTHLY, by Fitch Cheney. In this case, not even one single digit is given. x x )
104 Arithmetic Problems 1.1.3 AMM E1111 This is said to be the most popular MONTHLY problem. It appeared in the April issue of 1954. Our good friend and eminent numerologist, Professor Euclide Paracelso Bombasto Umbugio, has been busily engaged testing on his desk calculator the 81 10 9 possible solutions to the problem of reconstructing the following exact long division in which the digits indiscriminately were each replaced by x save in the quotient where they were almost entirely omitted. x x 8 x x ) Deflate the Professor! That is, reduce the possibilities to (18 10 9 ) 0. Martin Gardner s remark: Because any number raised to the power of zero is one, the reader s task is to discover the unique reconstruction of the problem. The 8 is in correct position above the line, making it the third digit of a five-digit answer. The problem is easier than it looks, yielding readily to a few elementary insights.
1.1 Reconstruction of division problems 105 1.1.4 AMM E971 Reconstruct the division problem ) 2 Charles Twigg comments that if the digit 2 is replaced by 9, the answer is also unique. ) 9
106 Arithmetic Problems 1.1.5 AMM E198 Here is a multiplication problem: A multiplication of a three-digit number by 2-digit number has the form in which all digits involved are prime numbers. Reconstruct the multiplication. (Note that 1 is not a prime number). p p p p p p p p p p p p p p p p p p
Chapter 2 Digit problems 2.1 When can you cancel illegitimately and yet get the correct answer? Let ab and bc be 2-digit numbers. When do such illegitimate cancellations as ab bc = a b bc = a c, allowing perhaps further simplifications of a? c Answer. 16 = 1, 19 = 1, 26 = 2, 49 = 4. 64 4 95 5 65 5 98 8 Solution. We may assume a, b, c not all equal. Suppose a, b, c are positive integers 9 such that 10a+b = a. 10b+c c (10a + b)c = a(10b + c),or(9a + b)c =10ab. If any two of a, b, c are equal, then all three are equal. We shall therefore assume a, b, c all distinct. 9ac = b(10a c). If b is not divisible by 3, then 9 divides 10a c =9a +(a c). It follows that a = c, a case we need not consider. It remains to consider b =3, 6, 9. Rewriting (*) as (9a + b)c =10ab. If c is divisible by 5, it must be 5, and we have 9a + b =2ab. The only possibilities are (b, a) =(6, 2), (9, 1), giving distinct (a, b, c) =(1, 9, 5), (2, 6, 5). If c is not divisible by 5, then 9a + b is divisible by 5. The only possibilities of distinct (a, b) are (b, a) =(3, 8), (6, 1), (9, 4). Only the
108 Digit problems latter two yield (a, b, c) =(1, 6, 4), (4, 9, 8). Exercise 1. Find all possibilities of illegitimate cancellations of each of the following types, leading to correct results, allowing perhaps further simplifications. (a) a bc = c, b ad d (b) c a b = c, d b a d (c) a b c = a. b cd d 2. Find all 4-digit numbers like 1805 = 19 2 5, which, when divided by the its last two digits, gives the square of the number one more than its first two digits.
2.2 Repdigits 109 2.2 Repdigits A repdigit is a number whose decimal representation consists of a repetition of the same decimal digit. Let a be an integer between 0 and 9. For a positive integer n, the repdigit a n consists of a string of n digits each equal to a. Thus, a n = a 9 (10n 1). Example 2.1. Show that 16 n 6 n 4 = 1 4, 19 n 9 n 5 = 1 5, 26 n 6 n 5 = 2 5, 49 n 9 n 8 = 4 8. Solution. More generally, we seek equalities of the form abn = a for b nc c distinct integer digits a, b, c. Here, ab n is digit a followed by n digits each equal to b. To avoid confusion, we shall indicate multiplication with the sign. The condition (ab n ) c =(b n c) a is equivalent to ( 10 n a + b ) ( ) 10b 9 (10n 1) c = 9 (10n 1) + c a, ( (10 n 1)a + b ) ( ) 10b 9 (10n 1) c = 9 (10n 1) a. Cancelling a common divisor 10n 1, we obtain (9a + b)c =10ab, which 9 is the same condition for ab = a. bc c Exercise 1. Complete the following multiplication table of repdigits. 1 n 2 n 3 n 4 n 5 n 6 n 7 n 8 n 9 n 1 1 n 2 n 3 n 4 n 5 n 6 n 7 n 8 n 9 n 2 4 n 6 n 8 n 1 n0 13 n 1 2 15 n 1 4 17 n 1 6 19 n 1 8 3 9 n 13 n 1 2 16 n 1 5 19 n 1 8 23 n 1 1 26 n 1 4 29 n 1 7 4 17 n 1 6 2 n0 26 n 1 4 31 n 2 08 35 n 1 2 39 n 1 6 5 27 n 1 5 3 n0 38 n 1 5 4 n0 49 n 1 5 6 39 n 1 6 46 n 1 2 53 n 2 28 59 n 1 4 7 54 n 2 39 62 n 2 16 69 n 1 3 8 71 n 2 04 79 n 1 2 9 98 n 2 01 2. Simplify (1 n )(10 n 1 5). Answer. (1 n )(10 n 1 5) = 1 n 5 n.
110 Digit problems Exercise 1. Find the three 3-digit numbers each of which is equal to the product of the sum of its digits by the sum of the squares of its digits. Answer. 133, 315, 803. 2. Find all 4-digit numbers abcd such that 3 abcd = a + b + c + d. Answer. 4913 and 5832. Solution. There are only twelve 4-digit numbers which are cubes. For only two of them is the cube root equal to the sum of digits. n 10 11 12 13 14 17 16 17 18 19 20 21 n 3 1000 1331 1728 2197 2744 3375 4096 4913 5832 6859 8000 9261 3. Use each digit 1, 2, 3, 4, 5, 6, 7, 8, 9 exactly once to form prime numbers whose sum is smallest possible. What if we also include the digit 0? 4. There are exactly four 3-digit numbers each equal to the sum of the cubes of its own digits. Three of them are 153, 371, and 407. What is the remaining one? 5. Find all possibilities of a 3-digit number such that the three numbers obtained by cyclic permutations of its digits are in arithmetic progression. Answer. 148, 185, 259, 296. Solution. Let abc be one such 3-digit numbers, with a smallest among the digits (which are not all equal). The other two numbers are bca and cab. Their sum abc + bca + cab = 111 (a + b + c). Therefore the middle number = 37 (a + b + c). We need therefore look for numbers of the form abc =37 k with digit sum equal to s, and check if 37 s = bca or cab. We may ignore multiples of 3 for k (giving repdigits for 37 k). Note that 3k < 27. We need only consider k =4, 5, 7, 8. k 37 k s 37 s arithmetic progression 4 148 13 13 37 = 481 148, 481, 814 5 185 14 14 37 = 518 185, 518, 851 7 259 16 16 37 = 592 259, 592, 925 8 296 17 17 37 = 629 296, 629, 962
2.2 Repdigits 111 6. A 10-digit number is called pandigital if it contains each of the digits 0, 1,..., 9 exactly once. For example, 5643907128 is pandigital. We regard a 9-digit number containing each of 1,...,9 exactly once as pandigital (with 0 as the leftmost digit). In particular, the number A := 123456789 is pandigital. There are exactly 33 positive integers n for which na are pandigital as shown below. n na n na n na 1 123456789 2 246913578 4 493827156 5 617283945 7 864197523 8 987654312 10 1234567890 11 1358024679 13 1604938257 14 1728395046 16 1975308624 17 2098765413 20 2469135780 22 2716049358 23 2839506147 25 3086419725 26 3209876514 31 3827160459 32 3950617248 34 4197530826 35 4320987615 40 4938271560 41 5061728349 43 5308641927 44 5432098716 50 6172839450 52 6419753028 53 6543209817 61 7530864129 62 7654320918 70 8641975230 71 8765432019 80 9876543120 How would you characterize these values of n? 7. Find the smallest natural number N, such that, in the decimal notation, N and 2N together use all the ten digits 0, 1,...,9. Answer. N = 13485 and 2N = 26970.
112 Digit problems 2.3 Sums of squares of digits Given a number N = a 1 a 2 a n of n decimal digits, consider the sum of digits function For example s(n) =a 2 1 + a 2 2 + + a 2 n. s(11) = 2, s(56) = 41, s(85) = 89, s(99) = 162. For a positive integer N, consider the sequence S(N) : N, s(n), s 2 (N),...,s k (N),..., where s k (N) is obtained from N by k applications of s. Theorem 2.1. For every positive integer N, the sequence S(N) is either eventually constant at 1 or periodic. The period has length 8 and form a cycle 37 58 16 89 1 4 145 20 42 A proof of the theorem is outlined in the following exercise.
2.3 Sums of squares of digits 113 Exercise 1. Prove by mathematical induction that 10 n 1 > 81n for n 4. 2. Prove that if N has 4 or more digits, then s(n) <N. Solution. If N has n digits, then (i) N 10 n 1, (ii) s(n) 81n. From the previous exercise, for n 4, N 10 n 1 > 81n s(n). 3. Verify a stronger result: if N has 3 digits, then s(n) <N. Solution. We seek all 3-digit numbers N = abc for which s(n) N. (i) Since s(n) 243, we need only consider n 243. (ii) Now if a =2, then s(n) =4+b 2 + c 2 186 <N. Therefore a =1. (iii) s(n) =1 2 + b 2 + c 2 is a 3-digit number if and only if b 2 + c 2 99. Here are the only possibilities: (b, c) (5, 9) (6, 9) (7, 9) (8, 9) (9, 9) (6, 8) (7, 8) (8, 8) (9, 5) (9, 6) (9, 7) (9, 8) (8, 6) (8, 7) s(n) 107 118 131 146 183 101 114 129 Therefore there is no 3-digit number N satisfying s(n) N. 4. For a given integer N, there is k for which s k (N) is a 2-digit number. 5. If n is one of the integers 1, 7, 10, 13, 19, 23, 28, 31, 32, 44, 49, 68, 70, 79, 82, 86, 91, 94, 97, then s k (N) =1for some k. 7 70 44 94 19 91 23 32 31 79 49 97 28 82 86 13 130 68 10 100 1
114 Digit problems 6. If N is a 2-digit integer other than 1, 7, 10, 13, 19, 23, 28, 31, 32, 44, 49, 68, 70, 79, 82, 86, 91, 94, 97, then the sequence S(N) is eventually cycling between 4, 16, 37, 58, 89, 145, 42, 20. 60 6 63 36 66 54 45 84 48 22 27 14 72 41 35 71 80 8 53 17 46 43 5 64 34 50 52 25 29 77 67 76 92 83 3 98 85 89 145 58 73 38 61 56 65 81 47 9 90 30 39 93 42 37 95 18 33 57 24 20 4 16 40 106 62 59 74 75 2 26 11 51 113 117 78 87 69 128 88