When the sum equals the product Leo Kurlandchik and Andrzej Nowicki Department of Mathematics and Computer Science, Nicholaus Copernicus University, 87-100 Toruń, Poland E-mail: (lekur @ mat.uni.torun.pl), (anow @ mat.uni.torun.pl) 10 November 1998 The natural numbers 1, 2, 3 have a special property: their sum is equal to their product. 1 + 2 + 3 = 1 · 2 · 3. The numbers 1, 1, 2, 4 possess the same property: 1 + 1 + 2 + 4 = 1 · 1 · 2 · 4. Look also at the following examples: 1+1+1+2+5 = 1·1·1·2·5 1+1+1+3+3 = 1·1·1·3·3 1 + 1 + 2 + 2 + 2 = 1 · 1 · 2 · 2 · 2. Let n > 2 be a natural number. We are interested in the sequences (x1 , . . . , xn ) of natural numbers such that x1 + x2 + · · · + xn = x1 · x2 · · · · · xn and x1 6 x2 6 · · · 6 xn . We denote by A(n) the set of all such sequences. Moreover, we denote by a(n) the cardinality of the set A(n), that is, a(n) is the number of all elements of A(n). The sequence (2, 2) is a unique element of A(2). Thus a(2) = 1. The above examples deal with the cases when n = 3, 4, 5. Now we will prove that these are all the examples of such forms. Theorem 1. a(3) = 1, a(4) = 1, a(5) = 3. Proof. For n = 3 we have: x1 x2 x3 = x1 + x2 + x3 6 3x3 , so x1 x2 6 3. Then (x1 , x2 ) is one of the pairs (1, 1), (1, 2), (1, 3). But only the case (x1 , x2 ) = (1, 2) is good and in this case x3 = 3. Hence the set A(3) has only one element (1, 2, 3). Let n = 4. Since x1 x2 x3 x4 = x1 + x2 + x3 + x4 < 4x4 (the case x1 = x2 = x3 = x4 is impossible), we have x1 x2 x3 6 3. The triple (x1 , x2 , x3 ) is then one of the triples (1, 1, 1), (1, 1, 2), (1, 1, 3). But only the case (x1 , x2 , x3 ) = (1, 1, 2) is good. The set A(4) has only one element (1, 1, 2, 4). For n = 5 we do the same. First we observe that x1 x2 x3 x4 6 4. This implies that (x1 , x2 , x3 , x4 ) is one of the sequences (1, 1, 1, 1), (1, 1, 1, 2), (1, 1, 1, 3), (1, 1, 1, 4), (1, 1, 2, 2). The sequences (1, 1, 1, 1) and (1, 1, 1, 4) are not good. There is no number x5 for such sequences. From the remaining sequences we obtain all the elements of A(5): (1, 1, 1, 2, 5), (1, 1, 1, 3, 3) and (1, 1, 2, 2, 2). One can find another proof of Theorem 1 in [1] (pp. 171 - 174). 1 Theorem 2. For any n > 2 the set A(n) is nonempty. Proof. A(n) contains the sequence (1, 1, . . . , 1, 2, n). Let us assume that the sequence (x1 , . . . , xn ) belongs to A(n). Then xi xn 6 x1 x2 . . . xn = x1 + x2 + · · · + xn 6 xn + xn + · · · + xn = nxn for all i = 1, . . . , n − 1. Therefore, the numbers x1 , . . . , xn−1 are smaller than n + 1. But they determine the number xn . Given x1 , . . . , xn−1 , we can find the number xn from the equality x1 · · · xn = x1 + · · · + xn . So we get: Theorem 3. For any n > 2 the set A(n) is finite. Note several facts concerning A(n) and a(n). Theorem 4. If (x1 , . . . , xn ) ∈ A(n) and n > 3, then x1 x2 · · · xn−1 6 n − 1. Proof. Observe that all the numbers x1 , √ . . . , xn are not √ equal. Suppose that x1 = · · · = xn = x. Then xn = nx and so x = n−1 n. But 1 < n−1 n < 2 for n > 3, so we have a contradiction. Therefore, x1 x2 · · · xn−1 xn = x1 + x2 + · · · + xn < nxn , hence x1 x2 · · · xn−1 6 n − 1. Theorem 5 ([1] 175). For any natural s there exists a natural n such that a(n) > s. Proof. Let n = 22s + 1 and let x1 = x2 = · · · = xn−2 = 1. If j ∈ {0, 1, 2, . . . , s}, then we define: xn−1 = 2j + 1, xn = 22s−j + 1. Every sequence (x1 , . . . , xn ), of the above form, belongs to A(n) and the number of such sequences equals s + 1. Theorem 6. If (x1 , . . . , xn ) ∈ A(n), n > 2, then x1 + · · · + xn 6 2n. The equality holds only in the case when (x1 , . . . , xn ) = (1, 1, . . . , 1, 2, n). Proof. Let bn denote the number of unit elements in (x1 , . . . , xn ) ∈ A(n). Let k be the number of non-unit elements in (x1 , . . . , xn ). We will denote the non-units elements by y1 + 1, y2 + 1, . . . , yk + 1, respectively, where 1 6 y1 6 y2 6 · · · 6 yk . It is clear that k > 2, bn + k = n and (1) (y1 + 1)(y2 + 1) . . . (yk + 1) = y1 + y2 + · · · + yk + k + bn . Let k = 2. Then y1 y2 = n − 1, hence y1 + y2 6 1+ n − 1 = n, yielding x1 + · · · + xn = n + y1 + y2 6 2n. The equality is only in the case when y1 = 1, y2 = n − 1, that is, only when (x1 , . . . , xn ) = (1, 1, . . . , 1, 2, n). 2 Let k > 3. Then the equality (1) implies: y1 + · · · + yk 6 y1 y2 + y2 y3 + · · · + yk y1 < (y1 + 1)(y2 + 1) . . . (yk + 1) − (y1 + · · · + yk ) = n. Therefore x1 + · · · + xn = y1 + · · · + yk + n < 2n. The above theorem was offered as a problem at the Polish Mathematical Olympiad in 1990. Theorem 7. Let (x1 , . . . , xn ) ∈ A(n), n > 2. Denote by bn the number of unit elements in (x1 , . . . , xn ). Then bn > n − 1 − [log2 n] . The equality holds, for example, in the case when n is of the form 2s − s (where s > 2) and (x1 , . . . , xn ) = (1, . . . , 1, 2, 2, . . . , 2). | {z } s Proof. Theorem 6 implies that 2n−bn 6 x1 · · · xn = x1 + · · · + xn 6 2n. Hence n − bn 6 log2 (2n) = 1 + log2 n and so bn > n − 1 − [log2 n]. The remaining part of this theorem is obvious. Theorem 8. If n is even and (x1 , . . . , xn ) ∈ A(n) then the number x1 + · · · + xn is divisible by 4. Proof. Suppose that all the numbers x1 , . . . , xn are odd. Then we have an even number of odd numbers. The sum x1 + · · · + xn is then an even number, and the product x1 · · · xn is odd. Therefore, at least one of the numbers x1 , . . . , xn is even. This means that the product is even and consequently the sum is also even. This implies that we have at least two even numbers. Thus the product, which is equal to the sum, is divisible by 4. n a(n) n a(n) n a(n) n a(n) n a(n) n a(n) n a(n) n a(n) n a(n) n a(n) 1 2 3 4 5 6 7 8 9 10 1 1 1 1 3 1 2 2 2 2 11 12 13 14 15 16 17 18 19 20 3 2 4 2 2 2 4 2 4 2 21 22 23 24 25 26 27 28 29 30 4 2 4 1 5 4 3 3 5 2 31 32 33 34 35 36 37 38 39 40 4 3 5 2 3 2 6 3 3 4 41 42 43 44 45 46 47 48 49 50 7 2 5 2 4 4 5 2 5 4 51 52 53 54 55 56 57 58 59 60 4 3 7 2 5 4 5 4 4 2 61 62 63 64 65 66 67 68 69 70 9 3 4 4 7 2 5 5 4 3 71 72 73 74 75 76 77 78 79 80 6 3 9 4 3 3 6 3 5 2 81 82 83 84 85 86 87 88 89 90 7 4 5 2 10 5 4 5 8 2 91 92 93 94 95 96 97 98 99 100 6 3 6 3 6 5 6 5 4 5 3 The tables, obtained by a computer programme, present the numbers a(n) for 1 6 n 6 100. We see, for example, that a(50) = 4, a(100) = 5. The set A(50) has exactly 4 elements. We can prove that every sequence (x1 , . . . , x50 ) belonging to A(50) is such that x1 = x2 = · · · = x47 = 1 and (x48 , x49 , x50 ) is one of the triples: (1, 2, 50), (1, 8, 8), (2, 2, 17), (2, 5, 6). The set A(100) has exactly 5 elements. Every element is of the form (x1 , . . . , x100 ), where x1 = x2 = · · · = x95 = 1 and (x96 , x97 , x98 , x99 , x100 ) is one of the sequences: (1, 1, 1, 2, 100), (1, 1, 1, 4, 34), (1, 1, 1, 10, 12), (1, 1, 4, 4, 7), (2, 2, 3, 3, 3). Using a computer we can prove that a(1997) = 20, a(1998) = 8, a(1999) = 16, a(2000) = 10. We see, looking at the above tables, that 24 is the maximal two-digit number n such that a(n) = 1. There exist exactly 3 natural three-digit numbers n with the property a(n) = 1. They are: 114, 174 and 444. The authors do not know the answer to the following question: Is there a natural n such that a(n) = 1 and n > 444 ? Now we present some facts concerning the case a(n) = 1. Theorem 9. Let n > 2. If a(n) = 1 then n − 1 is prime. Proof. Suppose that n − 1 is not prime. Then n = ab + 1 for some natural a, b with 2 6 a 6 b. Then the two sequences (1, 1, . . . , 1, 2, n) and (1, 1, . . . , 1, a + 1, b + 1) are different and they belong to A(n). As a consequence of the above theorem we get Theorem 10. If n > 4 and a(n) = 1, then 2 | n. Note also the following Theorem 11. If n > 5 and a(n) = 1, then 3 | n. Proof. Theorem 9 implies that n is not of the form 3k + 1. If n = 3k + 2 then the set A(n) has two different sequences (1, . . . , 1, 2, n) and (1, 1, . . . , 1, 2, 2, k + 1). From the above facts we obtain Theorem 12. If a(n) = 1 and n > 5, then 6 | n. Note also the following Theorem 13. If a(n) = 1 and n > 100, then n is of the form either 7k or 7k + 2 or 7k + 3 or 7k + 6 (k > 14). 4 Proof. The set A(n) contains the sequence (1, . . . , 1, 2, n). If n = 7k + 1 or 7k + 4 or 7k + 5, then A(n) contains also (1, 1, . . . , 1, 8, k + 1), (1, 1, . . . , 1, 2, 4, k + 1), (1, 1, . . . , 2, 2, 2, k + 1), respectively. Theorem 14. If a(n) = 1 and n > 100, then n is of the form 30k or 30k + 24 (k > 3). Proof. Since 6 | n (Theorem 12), the number n has one of the forms 30k, 30k + 6, 30k + 12, 30k + 18 or 30k + 24. If n = 30k + 6, then n − 1 is not prime; a contradiction with Theorem 9. We know that the set A(n) always contains the sequence (1, . . . , 1, 2, n). In the case when n = 30k + 12 or n = 30k + 18, the set A(n) contains also (1, 1, . . . , 1, 2, 2, 2, 2, 2k + 1), (1, 1, . . . , 1, 2, 3, 6k + 4), respectively. It follows from the above facts that if n > 100 and a(n) = 1 then the number n has one of the forms 210k, 210k + 24, 210k + 30, 210k + 84, 210k + 90, 210k + 114, 210k + 150 or 210k + 174. We proved (see Theorem 14) that if a(n) = 1 and n > 5 then n is of the form 30k or 30k + 24 (k > 0). We think, however, that the case n = 30k does not hold. Conjecture 1. If n > 5 and a(n) = 1, then n is of the form 30k + 24. Conjecture 2. If n > 100 and a(n) = 1, then n = 114 or n = 174 or n = 444. References [1] W. Sierpiński, Number Theory, Part II, (in Polish), PWN, Warszawa 1959. 5