Given a positive integer, we move the last digit of the number over to the front, leaving all the remaining digits intact.
If this new number is twice the original number, what is the smallest possible value of the original number?
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.
Imagine the last digit is a, and the rest of the digits would be the number b. We need to shift the digits of b one spot over to make a the last digit of the number. So my number can be written as : 10b + a How can we reverse the number? Well suppose b consists of m digits. We need to shift a over m spots to make it the first digit of the number. Then we add b to make up the rest of the digits. The new number will be : 10ma + b The new number is equal to double the original number, so we have the following equation.
2(10b + a) = 10ma + b
We can simplify this equation.
20b + 2a = 10ma + b 19b = 10ma – 2a 19b = 2a(5×10m – 1 – 1) b = 2a(5 × 10m – 1 – 1)/19
Since b is a whole number, we need to have 19 be a factor of either 2, a, or (5 × 10m – 1 – 1). But 19 is not a factor of 2, and it cannot be a factor of a either–as a is a digit 9 or smaller. Thus 19 has to be a factor of (5×10m – 1 – 1). Now we have to solve for this.
You cannot simply compute larger and larger values of m on your calculator as the numbers 5 × 10m – 1 gets astronomically large.
The trick is to think in terms of remainders. We need 5 × 10m – 1 to be a multiple of 19, which means 5 × 10m – 1 is equal to 0 (mod 19), or that 5 × 10m ≡ 1 (mod 19).
This can be readily calculated by hand or calculator. Here is how you can calculate m = 1.
5 × 101 – 1 ≡ 5 (mod 19) ≡ 5 (mod 19)
To find the value for m = 2, which is larger by a factor of 10, we can multiply the previous remainder by 10 and simplify.
5 × 102 – 1 ≡ 10(5) (mod 19) ≡ 50 (mod 19) ≡ 12 (mod 19)
To find the next value for m = 3, we can multiply the previous remainder by 10 and simplify.
5 × 103 – 1 ≡ 10(12) (mod 19) ≡ 120 (mod 19) ≡ 6 (mod 19)
Now we keep calculating until we find a value of 1.
m 5 × 10(m – 1) (mod 19) 1 5 2 12 3 6 4 3 5 11 6 15 7 17 8 18 9 9 10 14 11 7 12 13 13 16 14 8 15 4 16 2 17 1 The smallest value is m = 17. Substituting that into a calculator, we will find
b = 2a(5 × 1017 – 1 – 1)/19 b = 2a(2,631,578,947,368,421) b = a(5,263,157,894,736,842)
Since m = 17, the original number needs to have 18 digits (including the spot for a). If we try a = 1, this results in the 16 digit value b = 5,263,157,894,736,842 which only leads to the 17-digit number 52,631,578,947,368,421 which is not a solution. A solution does exist when we try a = 2. This results in the 17 digit value b = 10,526,315,789,473,684 which leads to the 18-digit number 105,263,157,894,736,842. a = 2 is the smallest possible value, and it gives the 18 digit solution 105,263,157,894,736,842.