Define S ( n ) as the sum of the digits of n . Let N denote the smallest positive integer such that N + S ( N ) + S ( S ( N ) ) = 9 9 . What is S ( N ) ?
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.
By the way it is also possible with N = 8 4
Log in to reply
N=81 works too
Log in to reply
Both N= 81,84 but they are not smaller than N=78
I know it's a strange solution but... It's just how I solved it:
Case 1:
S ( N ) is a one-digit integer. Then, we have that N = 9 9 − 2 S ( N ) (Because in this assumption we know that as S ( N ) has one digit, S ( S ( N ) ) = S ( N ) . If we check for S ( N ) in the range 1 ≤ S ( N ) ≤ 9 , we will get eventually the solution N = 8 1 .
Case 2:
S ( N ) is a two-digit integer. In this case, we note various things. First, N < 1 0 0 in order to comply the equation given. Second, as N < 1 0 0 , the highest value S ( N ) could take is 1 8 , and this tells us that S ( S ( N ) ) will be a one digit number. Then, let's express our N as a b , and let's express S ( S ( N ) ) as some one-digit integer c . We know that a b = 1 0 a + b . Also, S ( N ) will simply be a + b , and S ( S ( N ) ) = c . Our equation is:
1 1 a + 2 b + c = 9 9 .
With some mental testing we can see that this equation requires N to be at least bigger than 7 0 . This is why I set a = 7 . The equation turns to be:
2 b + c = 2 2 .
Here it's much easier, as we just have to test 7 ≤ b ≤ 9 (otherwise, we would make c be a two-digit integer). We get the following three triplets ( N , S ( N ) , S ( S ( N ) ) ) :
( 7 7 , 1 4 , 5 ) , ( 7 8 , 1 5 , 6 ) , ( 7 9 , 1 6 , 7 ) .
Recall that after all S ( S ( N ) ) = c . So here the only solution that isn't contradicting this equation (and that satisfies the original equation of the problem) is the second triplet. Hence, the answer is
S ( N ) = 1 5 .
Obviously I'm open to any comment! :)
Problem Loading...
Note Loading...
Set Loading...
Let T ( N ) = N + S ( N ) + S ( S ( N ) ) . Since neither S ( N ) nor S ( S ( N ) ) can be zero, we must have N ≤ 9 7 . Thus S ( N ) ≤ 1 7 (using N = 8 9 ) and S ( S ( N ) ) ≤ 9 . This gives a crude lower bound for N of 9 9 − ( 1 7 + 9 ) = 7 3 . If S ( N + 1 ) has the same number of digits as S ( N ) , then T ( N + 1 ) = T ( N ) + 3 since S ( N + 1 ) will be one more than S ( N ) and S ( S ( N + 1 ) ) will be one more than S ( N ) . Moreover, as long as S ( N + k ) continues to have the same number of digits as S ( N ) , we have T ( N + k ) = T ( N ) + 3 k . The first integer M greater than 7 3 such that S ( M ) has only one digit is M = 8 0 . Thus the formula will work from 7 3 up to 7 9 , so for 1 ≤ k ≤ 6 . We have T ( 7 3 ) = 7 3 + S ( 7 3 ) + S ( S ( 7 3 ) ) = 7 3 + 1 0 + 1 = 8 4 , and 9 9 − 8 4 = 1 5 = 3 ⋅ 5 . Thus 9 9 = T ( 7 3 ) + 3 ⋅ 5 = T ( 7 8 ) . Therefore N = 7 8 is the smallest integer with T ( N ) = 9 9 .