The digits of the positive integer n include no 9s, exactly four 8s, exactly three 7s, exactly two 6s, and some other digits. If the sum of the digits of n is 104 and the sum of the digits of 2 n is 100, then how many times the digit 5 occurs in 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.
First, note that it does not specify where the 8 , 7 , 6 's are, so we can assume that they go in the front in the order 8 8 8 8 7 7 7 6 6 and hope that it works out later.
We have that the current digit sum is 6 5 , so we must have 1 0 4 − 6 5 = 3 9 more. In addition, the digit sum of 2 n so far would be 1 + 7 + 7 + 7 + 7 + 5 + 5 + 5 + 3 + ( 2 or 3 ) = 5 0 or 4 9 where the sum is unclear because we don't know if the next digit will carry or not.
Now let us assume that the next digit is a 5 . That means that the sum so far of 2 n is 5 0 because 2 × 5 carries over 1 .
Now, note that for all digits 0 → 4 , we have that the digit sum of 2 n is always twice the digit sum of n . Because 2 × 3 9 = 5 0 , we must have at least one 5 in 2 n to balance it out.
Now let's do some simple casework: if there is one 5 , then the digit sum of n not including the digits given is 3 4 and the digit sum of 2 n (again not including the digits given) is 5 0 . Obviously 3 4 × 2 = 5 0 so we consider the next case.
If there are two 5 's, then the digit sum of n is 2 9 and the digit sum of 2 n is 4 9 . Since 2 9 × 2 = 4 9 , we move on to the next case.
If there are three 5 's, then the digit sum of n is 2 4 and the digit sum of 2 n is 4 8 . Since 2 4 × 2 = 4 8 , this is our working case and so the answer is 3 fives.
I think there is a pretty simple solution to this. As you mentioned, the sum of the given numbers is 65, so the sum of the other numbers, 1, 2, 3, 4, and 5, is 39.
When we double 8, we get a new 1 and a 6, so the new sum would be 7. When we double 7, we get a new 1 and a 4, so the new sum would be 5, and when we double 6, we get a new 1 and a 2, so the new sum would be 3.
Thus the digit sum of 2n is
\begin{align} 4 \times 7 + 3 \times 5 + 2 \times 3 + s = 100 \\ s = 51 \end{align}
So the new sum of the doubled numbers will be 51.
Well, when we double 1, 2, 3, and 4, the digit sum is doubled, but when we double 5, the digit sum becomes 1 + 0 = 1.
Thus we can make an equation where we solve for the number of 5s. The sum of all non-5 numbers when there are x 5s is
\begin{align} 39 - 5x \end{align}
In 2n, this sum is doubled. Also, for every 5, we add 1 to the digit sum of 2n. We can get the equation
\begin{align} 2(39 - 5x) + x = 51 \end{align}
So
\begin{align} 78 - 10x + x = 51 \\ 27 = 9x \\ \boxed{x = 3} \end{align}
Also, if someone could teach me how to Latex, that would be great
Log in to reply
Darn. You beat me to it. :P
Also, to render in-line LaTeX, use these before and after your equations: \ ( \ )
x = 2 a − b ± b 2 − 4 a c is equivalent to \ ( x = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a} \ ).
*( 39 - 5x \ In~ 2n, ~this~ sum~ is~ doubled.~ Also,~ for~ every~ 5 ,\ we~ add ~1~ to~ the~ digit~ sum ~of ~2n.~ We ~can ~get~ the~ equation \ 2(39 - 5x) + x = 51 .~~~~~~ So \ 78 - 10x + x = 51 \ 27 = 9x \ \boxed{x = 3} *) ......................In the above just replace * with \. Copy in your solution.
Sorry for the long and ungainly solution. I was rushing a bit :(
Log in to reply
Do you think this solution involves too much assumption here, especiially in "Now let us assume that the next digit is a 5."
Log in to reply
It works out, so it's fine.
Log in to reply
@Daniel Liu – Well, it only works fine because the question was about "the number of 5 s", and not "the largest possible number of 5 s " or the "smallest possible number of 5 s". Here is the a solution without any assumptions.
Observe that whenever a number is added to itself, the sum of the digits is twice the sum of the digits of the original number minus 9 times the number of carryovers. The carryovers occur exactly when a digit 5 , 6 , 7 , 8 , or 9 is added to itself, regardless of whether there was a carryover before that. So the total number of digits 5 , 6 , 7 , 8 , 9 is 9 2 ⋅ 1 0 4 − 1 0 0 = 1 2 . Since we are given that there are exactly 9 digits that are 6 or more, the number of 5 s must be 3 .
Log in to reply
@Alexander Borisov – what about this answer: 33330909090667778888
Log in to reply
@A Former Brilliant Member – The first sentence of the problem question says that the integer does not have any 9 s .
Log in to reply
@Alexander Borisov – oh! come on! i thought that the sentence reads "contains a number of 9's!!
@Alexander Borisov – can you try to phrase the problem's a bit more clearly?
@Alexander Borisov – Congratulations. According to me, your is the only complete answer.
On an unrelated note, the problem source is Cayley 2012 (Canadian contest!)
what about this answer: 33330909090667778888
Log in to reply
NO NINES MATE !!!NO NINES
you cannot use 9
Well I did a combination of 1,2,3,4,5 to get 104... I found 3 5s, 2 4s and 1 1,2,3 each sums up to 104
Since location of digits are unknown, hit and trial worked and I had no idea how to use other info - 2n and 100
Problem Loading...
Note Loading...
Set Loading...
Let S ( n ) denote the digit sum of n . We can see fairly easily that, given S ( n ) , S ( 2 n ) can be calculated in the following way:
8 ⋅ 2 = 1 6 , so for k 8 's in n , ( 1 + 6 ) k = 7 k will be added to the digit sum of 2 n .
7 ⋅ 2 = 1 4 , so for k 7 's in n , ( 1 + 4 ) k = 5 k will be added to the digit sum of 2 n .
6 ⋅ 2 = 1 2 , so for k 6 's in n , 3 k will be added.
5 ⋅ 2 = 1 0 , so for k 5 's in n , k will be added.
For all other digits less than 5 , the digit sum will double per digit.
Since we are trying to look for the number of 5 's in n , let the number of 5 's be equal to x , and let the sum of the digits below 5 be equal to y . The problem gives that
S ( n ) = 1 0 4 = 4 ( 8 ) + 3 ( 7 ) + 2 ( 6 ) + 5 x + y ,
so 5 x + y = 3 9 . We also know, by our double-digit-sum calculator, that
S ( 2 n ) = 1 0 0 = 4 ( 7 ) + 3 ( 5 ) + 2 ( 3 ) + x + 2 y ,
so x + 2 y = 5 1 . Solving for x , we find that our answer is 3 .