The Sum of the Other Rearrangement of Digits

Suppose that f ( n ) f(n) takes the number n n and finds the sum of all different possible permutations of its digits in base 10 (not including the original number n n ).

For example, f ( 123 ) f(123) will output the sum 132 + 213 + 231 + 312 + 321 132+213+231+312+321 .

Now, there is a four-digit number x x with distinct digits, and f ( x ) f(x) is equal to 62339.

What is the smallest possible value for x ? x?


The answer is 4321.

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.

1 solution

Nick Turtle
Oct 25, 2017

Suppose that the number is 1000 a + 100 b + 10 c + d 1000a+100b+10c+d .

There are 24 24 different rearrangements of the digits ( including itself ). Notice that there are 6 6 arrangements when the thousand-digit is a a , 6 6 arrangements when the thousand-digit is b b , 6 6 arrangements when the thousand-digit is c c , 6 6 arrangements when the thousand-digits is d d . Same for the hundreds-digit, tens-digit, and units-digit.

Thus, the sum of the 24 24 rearrangements is 6000 ( a + b + c + d ) + 600 ( a + b + c + d ) + 60 ( a + b + c + d ) + 6 ( a + b + c + d ) = 6666 ( a + b + c + d ) 6000(a+b+c+d)+600(a+b+c+d)+60(a+b+c+d)+6(a+b+c+d)=6666(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 6666 6666 .

We are told that the f ( x ) = 62339 f(x)=62339 . This is the sum of the rearrangements that does not include the x x . So, if x x is added to 62339 62339 , the number is divisible by 6666 6666 (as discussed above). Since we are finding the smallest possible value for x x , we need to find the smallest positive value that, when added to 62339 62339 , is divisible by 6666 6666 .

The smallest number divisible by 6666 6666 that is larger than 62339 62339 is 66660 66660 . Thus, the smallest possible value of x x is x = 66660 62339 = 4321 x=66660-62339=4321 .

We can check that 4321 4321 indeed works. The sum of all 24 arrangements of 4321 4321 is 6666 ( 4 + 3 + 2 + 1 ) = 66660 6666(4+3+2+1)=66660 . Now, this minus 4321 4321 is 66660 4321 = 62339 66660-4321=62339 .

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...