   SEARCH HOME Math Central Quandaries & Queries  Question de Jim, un parent : Hello! We've been working on understanding a problem that is similar to one that you dealt with a few weeks back. But our direction has not worked. Can you help? The problem is as follows: A number ends in 2. If you were to place that digit at the beginning of the number, the resulting number will be twice the original. Find the smallest such number. We have tried working this problem both by hand as well as with MS Excel, but nothing has worked. Hi Jim. Here's how I would approach the problem.

A number (N) ends in a 2. Therefore, there exists a number n, which you can multiply by 10 and add 2 to get N:

N = 10n + 2

Now if you move the 2 from the back to the front, shifting all the other digits one place towards the decimal point, you get twice the original, which mean 2N.

So
2N = 2(10n + 2) = 20n + 4.

but also, 2N = 2p + n, where p is a power of 10 where the power is the number of digits in n.

For example, if N = 65432, then n is 6543. p is 104 = 10000, so 2p + n is 20000 + 6543 = 26543 (clearly this is not equal to 2N, but it was just an example after all).

Since both expressions equal 2N, they equal each other:

20n + 4 = 2p + n
19n + 4 = 2p
p = (19/2)n + 2

Since we know n and p are a positive integer, n must be even. Thus there exists a positive integer h = n/2.

p = 19h + 2.

Now remember that p is a power of 10, so

10i = 19h + 2

for some positive integer i. Thus,

10i - 2 divides 19.

or in other words,

10i mod 19 = 2.

Since this will cycle in 19 steps, it is easy to just check them using a calculator or spreadsheet. I find that 1017 mod 19 = 2.

So i = 17, then p = 1017.

Then h = (1017 - 2 ) / 19 = 5263157894736842.

And n is twice that: 10526315789473684.

Thus N is 10n + 2 = 105263157894736842.

So if we move the 2 from the back to the front we have 210526315789473684.

And is that 2N? Yes it is.
I hope you are convinced that we found a number that works, even if it is less clear why this is the lowest such number.

Cheers,
Stephen La Rocque.     Math Central is supported by the University of Regina and The Pacific Institute for the Mathematical Sciences.