Find k

For each positive integer n , n, suppose s ( n ) s(n) is the sum of the digits of n . n. Find the smallest positive integer k k such that

s ( k ) = s ( 2 k ) = s ( 3 k ) = = s ( 2013 k ) = s ( 2014 k ) . s(k) = s(2k) = s(3k) = \cdots = s(2013k) = s(2014k).


The answer is 9999.

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.

2 solutions

Mark Hennings
Oct 7, 2017

Suppose that 1 k 9999 1 \le k \le 9999 is an at most 4 4 -digit number, so that k = a b c d k = \overline{abcd} for some 0 a , b , c , d 9 0 \le a,b,c,d \le 9 . Then s ( k ) = a + b + c + d s(k) = a+b+c+d and 1001 k = a b c d 000 + a b c d = a 000 b c d + b c d 000 + a 000 1001k \; = \; \overline{abcd000} + \overline{abcd} \;= \; \overline{a000bcd} + \overline{bcd000} + \overline{a000} There are various cases to consider:

  • If b c d + a < u v w < 1000 \overline{bcd} + a < \overline{uvw} < 1000 , then 1001 k = a u v w b c d 1001k = \overline{auvwbcd} , so that s ( 1001 k ) = s ( k ) + u + v + w > s ( k ) s(1001k) = s(k) + u+v+w > s(k) . Note that since u v w > 0 \overline{uvw} > 0 , u + v + w > 0 u+v+w > 0 .
  • If b c d + a = 100 u 1000 \overline{bcd} + a = \overline{100u} \ge 1000 and a 8 a \le 8 , then 1001 k = ( a + 1 ) 00 u b c d 1001k = \overline{(a+1)00ubcd} , and so s ( 1001 k ) = s ( k ) + 1 + u > s ( k ) s(1001k) = s(k) + 1 + u > s(k) .
  • If b c d + a = 100 u 1000 \overline{bcd} + a = \overline{100u} \ge 1000 and a = 9 a=9 , then 1001 k = 1000 u b c d 1001k = \overline{1000ubcd} and so s ( 1001 k ) = s ( k ) + u 8 s(1001k) = s(k) + u - 8 . Since 1000 u 999 + 9 = 1008 \overline{1000u} \le 999 + 9 = 1008 , we deduce that u 8 u \le 8 , and hence that s ( 1001 k ) < s ( k ) s(1001k) < s(k) unless u = 8 u=8 , which can only happen when a = b = c = d = 9 a=b=c=d=9 .

Thus we have shown that s ( 1001 k ) s ( k ) s(1001k) \neq s(k) for all 1 k 9998 1 \le k \le 9998 .

If 1 j 9999 1 \le j \le 9999 we can write j = p q r s j = \overline{pqrs} for some integers 0 p , q , r , s 9 0 \le p,q,r,s \le 9 . But then 9999 j = 10000 j j = p q r s 0000 p q r s = { p q r ( s 1 ) ( 9 p ) ( 9 q ) ( 9 r ) ( 10 s ) s > 0 p q ( r 1 ) 9 ( 9 p ) ( 9 q ) ( 10 r ) 0 r > 0 , s = 0 p ( q 1 ) 99 ( 9 p ) ( 10 q ) 00 q > 0 , r = s = 0 ( p 1 ) 999 ( 10 p ) 000 p > 0 , q = r = s = 0 9999j \; = \; 10000j - j \; = \; \overline{pqrs0000} - \overline{pqrs} \; = \; \left\{ \begin{array}{lll} \overline{pqr(s-1)(9-p)(9-q)(9-r)(10-s)} & \hspace{1cm} & s > 0 \\ \overline{pq(r-1)9(9-p)(9-q)(10-r)0} & & r > 0, s = 0 \\ \overline{p(q-1)99(9-p)(10-q)00} & & q > 0, r = s = 0 \\ \overline{(p-1)999(10-p)000} & & p > 0, q = r = s = 0 \end{array} \right. which shows that s ( 9999 j ) = 36 = s ( 9999 ) s(9999j) = 36 = s(9999) for all 1 j 9999 1 \le j \le 9999 , and so certainly for 1 j 2014 1 \le j \le 2014 . The answer is 9999 \boxed{9999} .

Rohith M.Athreya
Nov 4, 2017

Since a fully mathematical proof has already been presented by @Mark Hennings ,I present a computer program In C which solves the problem.

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...