Find the smallest 5-digit-integer N so that 2 N is also a 5-digit-integer and all digits 0 , 1 , 2 , 3 , … , 9 contain in both N and 2 N .
Note : Each number, N and 2 N must contain 5 distinct digits and all the digits in N must different from those in 2 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.
Well Put solution !
From 10000 to 99999, we have:
1 2 3 4 5 6 7 |
|
Simple program can get 48 of them all together but the smallest wanted is 13485.
Answer: 1 3 4 8 5
Let N = a b c d e and 2 N = f g h i j . Clearly a ≥ 1 . Suppose a = 1 , b < 5 , then f = 2 .
Now, if b = 0 , then g ∈ { 0 , 1 } , impossible. So b ≥ 3 . Suppose b = 3 . If we also assume c < 5 , then we have g = 6 .
Similar reasoning can be used to prove that c = 0 is impossible, so there is only one remaining number: c = 4 . This means h = 8 or h = 9 .
If h = 8 , then d < 5 . Since we have used 1 , 2 , 3 , 4 , then we need to have d = 0 , but then i ∈ { 0 , 1 } , contradiction. So h = 9 .
Since 2 N is even, j ∈ { 0 , 8 } . But if j = 8 , then e ∈ { 4 , 9 } , contradiction. So j = 0 , e = 5 , and the rest can be easily tested: d = 8 , i = 7 . This gives N = 1 3 4 8 5 , 2 N = 2 6 9 7 0 . Since we have been taking the smallest values, and it's clear that greedily taking the smallest digits for the leftmost places work, this is the smallest possible value.
Bingo! Now another question: Are there more numbers which satisfy this condition?
Log in to reply
Clearly. The next smallest number, continuing my analysis above, is 1 3 5 4 8 with its double 2 7 0 9 6 .
If you want to find all numbers, just try making a program. Should be easy to implement (test each number from 10000 to 49999, concatenate it and its double into a single string, sort the string, check if it's "0123456789").
Log in to reply
Yep, and after that there is comes 13845
Yes, same solution as mine!
Yes. 13548 is the 2nd.
18546 is possibly the next no.
16485 is another number
Problem Loading...
Note Loading...
Set Loading...
lets assume the number to be 'N'. We want to find the smallest such number, and for this we will start with the smallest possible numbers starting from the leftmost digits of N and 2N. Let us start with 1 as the first digit of N. This makes the first digit of 2N 2 or 3 and 2 is the smaller of these. 0 cannot be a digit of N because then its corresponding digit in 2N would either be 0 or 1, both of which are already taken. The next smallest number we can use for the second digit of N is 3. The next smallest number that we can use for the third digit of N is 4. Now that we have no more numbers less than 5 that we can use for N, there must be a carryover onto the third digit of 2N, making it be 9 instead of 8. The next smallest number we can use for the fourth digit of N is 5. However, there will be a carryover because there are no more available digits less than five, and the fourth digit of 2N would be 1, which we have already used. The next smallest number we can use for the fourth digit of N is 7. The fourth digit of 2N would then be 5. However, this leaves us with the numbers 8 and 0 for the last digits of N and 2N, and 28 = 16, whose last digit is not 0. So, our next smallest number which we can use for the fourth digit of N is 8. This would mean that the fourth digit of 2N is 7. This leaves only 5 for the last digit of N. 52 = 10. 0 would be the last digit of 2N, and everything fits together perfectly. So, the smallest numbers N and 2N such that the digits 0 through 9 are used exactly once are:
N = 13485
2N = 26970