Suppose that takes the number and finds the sum of all different possible permutations of its digits in base 10 (not including the original number ).
For example, will output the sum .
Now, there is a four-digit number with distinct digits, and is equal to 62339.
What is the smallest possible value for
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.
Suppose that the number is 1 0 0 0 a + 1 0 0 b + 1 0 c + d .
There are 2 4 different rearrangements of the digits ( including itself ). Notice that there are 6 arrangements when the thousand-digit is a , 6 arrangements when the thousand-digit is b , 6 arrangements when the thousand-digit is c , 6 arrangements when the thousand-digits is d . Same for the hundreds-digit, tens-digit, and units-digit.
Thus, the sum of the 2 4 rearrangements is 6 0 0 0 ( a + b + c + d ) + 6 0 0 ( a + b + c + d ) + 6 0 ( a + b + c + d ) + 6 ( a + b + c + d ) = 6 6 6 6 ( a + b + c + d ) . This means that the sum of all the rearrangements of the digits of a four-digit number (including itself) is divisible by 6 6 6 6 .
We are told that the f ( x ) = 6 2 3 3 9 . This is the sum of the rearrangements that does not include the x . So, if x is added to 6 2 3 3 9 , the number is divisible by 6 6 6 6 (as discussed above). Since we are finding the smallest possible value for x , we need to find the smallest positive value that, when added to 6 2 3 3 9 , is divisible by 6 6 6 6 .
The smallest number divisible by 6 6 6 6 that is larger than 6 2 3 3 9 is 6 6 6 6 0 . Thus, the smallest possible value of x is x = 6 6 6 6 0 − 6 2 3 3 9 = 4 3 2 1 .
We can check that 4 3 2 1 indeed works. The sum of all 24 arrangements of 4 3 2 1 is 6 6 6 6 ( 4 + 3 + 2 + 1 ) = 6 6 6 6 0 . Now, this minus 4 3 2 1 is 6 6 6 6 0 − 4 3 2 1 = 6 2 3 3 9 .