Digit products and sums

For every positive integer n n , let P ( n ) P(n) be the product of the digits of n n , and let S ( n ) S(n) be the sum of the digits of n n .

If m m is the minimum value such that m m is a multiple of 99 and P ( m ) P ( m + 2 ) = 990 P(m)-P(m+2)=990 , find S ( m ) + S ( m + 2 ) S(m)+S(m+2) .


The answer is 65.

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

1 solution

Brian Moehring
Aug 11, 2018

Write m = 100 N + 10 d 10 + d 1 m = 100N + 10d_{10} + d_1 where N = m 100 N = \left\lfloor\frac{m}{100}\right\rfloor and 0 d 10 , d 1 9 0 \leq d_{10}, d_1 \leq 9 are the tens and ones digits, respectively, of m . m. The rest of the proof will follow by several smaller arguments, so I'll number them to keep them separate and organized.

  1. We note that P ( n ) , P(n), as the product of digits, for any natural number n , n, is either 0 0 or a product of primes less than 10 , 10, so that we have 11 divides P ( n ) P ( n ) = 0. 11 \text{ divides } P(n) \iff P(n) = 0. Since 11 11 divides 990 = P ( m ) P ( m + 2 ) , 990 = P(m) - P(m+2), P ( m ) = 0 11 divides P ( m ) 11 divides P ( m + 2 ) P ( m + 2 ) = 0 990 = P ( m ) P ( m + 2 ) = 0 P(m) = 0 \iff 11 \text{ divides } P(m) \iff 11 \text{ divides } P(m+2) \iff P(m+2)=0 \iff 990 = P(m)-P(m+2) = 0 Obviously, this is a contradiction, so we can conclude that P ( m ) , P ( m + 2 ) 0 , P(m),P(m+2) \neq 0, so none of the digits of either m , m + 2 m,m+2 is zero, and in particular, d 1 0 , 8. d_1 \neq 0, 8.
  2. If d 1 7 d_1 \leq 7 , then d 1 + 2 9 d_1 + 2 \leq 9 , so P ( m ) = d 1 P ( 10 N + d 10 ) ( d 1 + 2 ) P ( 10 N + d 10 ) = P ( m + 2 ) 990 = P ( m ) P ( m + 2 ) 0 P(m) = d_1P(10N+d_{10}) \leq (d_1+2)P(10N+d_{10}) = P(m+2) \implies 990 = P(m)-P(m+2) \leq 0 which is once again a contradiction, so we conclude that d 1 > 7. d_1 > 7. Combining this with the result of Step 1, we conclude d 1 = 9. d_1 = 9.
  3. Then m + 2 = 100 N + 10 d 10 + 9 + 2 = 100 N + 10 ( d 10 + 1 ) + 1 m+2 = 100N + 10d_{10} + 9 + 2 = 100N + 10(d_{10} + 1) + 1 and by the result of step 1 again, d 10 + 1 10 , d_{10} + 1 \neq 10, so in particular d 10 + 1 9 d_{10} + 1 \leq 9 is the tens digit of m + 2. m+2. This allows us to write 990 = P ( m ) P ( m + 2 ) = P ( N ) ( d 10 9 ) P ( N ) ( ( d 10 + 1 ) 1 ) = P ( N ) ( 8 d 10 1 ) , 990 = P(m) - P(m+2) = P(N)(d_{10}\cdot 9) - P(N)((d_{10}+1)\cdot 1) = P(N)(8d_{10} - 1), so P ( N ) ( 8 d 10 1 ) = 990 0 ( m o d 11 ) N = 0 or d 10 7 ( m o d 11 ) N = 0 or d 10 = 7. P(N)(8d_{10} - 1) = 990 \equiv 0 \pmod{11} \implies N=0 \text{ or } d_{10} \equiv 7 \pmod{11} \implies N=0 \text{ or } d_{10} = 7. Now, if N = 0 N=0 then 990 P ( m ) = d 10 9 9 9 = 81 990 \leq P(m) = d_{10}\cdot 9 \leq 9\cdot 9 = 81 which is another contradiction, so we can conclude d 10 = 7 , d_{10} = 7, and putting this back into a previous equation in this step, 990 = P ( N ) ( 8 ( 7 ) 1 ) P ( N ) = 18. 990 = P(N)(8(7)-1) \implies P(N) = 18. Since 18 = 9 × 2 = 6 × 3 = 3 × 3 × 2 , 18 = 9\times 2 = 6\times 3 = 3\times 3 \times 2, the digits of N N must be any number of 1 s 1\text{s} along with one of the following cases: one 9 9 and one 2 ; 2; one 6 6 and one 3 ; 3; or two 3 s 3\text{s} and one 2. 2.
  4. Since m = 100 N + 79 0 ( m o d 99 ) m = 100N + 79 \equiv 0 \pmod{99} we can solve for N 20 ( m o d 99 ) . N \equiv 20 \pmod{99}. Here, it will be useful to list a few more residues, so N 20 , 119 , 218 ( m o d 99 ) N \equiv 20, 119, 218 \pmod{99}
  5. If we suppose N N has M M digits and use 1 0 2 1 ( m o d 99 ) 10^2 \equiv 1 \pmod{99} to compute 1 0 M 1 + 1 0 M 2 + + 10 + 1 10 M 2 + M + 1 2 ( m o d 99 ) 10^{M-1} + 10^{M-2} + \cdots + 10 + 1 \equiv 10\left\lfloor\frac{M}{2}\right\rfloor + \left\lfloor\frac{M+1}{2}\right\rfloor \pmod{99} Then we can compute N ( m o d 99 ) N \pmod{99} by listing this result for increasing values of M M and adding ( d 1 ) (d-1) or 10 ( d 1 ) 10(d-1) for each set of the possible digits of N N not equal to 1. 1. This is a little bit of a slog (though it can be made a little more efficient, I didn't find a good reason to make such an argument), but we end up finding the smallest value of N N is given by M = 13 M=13 using the digits 6 6 and 3 , 3, which works because 10 13 2 + 13 + 1 2 + 10 ( 6 1 ) + ( 3 1 ) = 119 10\left\lfloor\frac{13}{2}\right\rfloor + \left\lfloor\frac{13+1}{2}\right\rfloor + 10(6-1) + (3-1) = 119 is one of the residues for N ( m o d 99 ) N \pmod{99} we found earlier. It doesn't matter for the final answer, but for those who are interested, this gives N = 1111111111163 N = 1111111111163 so that the smallest value of m m is m = 111111111116379 m = 111111111116379

Finally, for this value of m , m, we have S ( m ) = 11 1 + 6 + 3 + 7 + 9 = 36 S ( m + 2 ) = 11 1 + 6 + 3 + 8 + 1 = 29 S(m) = 11\cdot 1 + 6 + 3 + 7 + 9 = 36 \\ S(m+2) = 11\cdot 1 + 6 + 3 + 8 + 1 = 29 giving S ( m ) + S ( m + 2 ) = 36 + 29 = 65 S(m) + S(m+2) = 36 + 29 = \boxed{65}

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...