I have been given the following puzzle:
find the smallest number that it's right most digit is 2, and if you remove that digit and place it on the left most side of the number it will double its value
this is what i have gotten:
- a number we seek (minus last digit)
- b is the a's digit count+1
$$ 2(10a+2) = 2*10^b+a $$ which yields $$ a = \frac{2*10^b-4}{19}$$
I could not solve the above equation, can any one help me in finding integer solutions (analytically that is - not brute force) ?
b.t.w: the puzzle itself i have solved building the number digit by digit, the solution is very interesting as it is related to the above equation though i cannot understand as to why.
Spoiler
it is the number created by the Repeating decimal of 2/19 (18 digits)
Your equation $a=\dfrac{2\cdot10^b-4}{19}$ is correct, hence you are looking for a $b$ such that $$2\cdot10^b\equiv4\mod19.$$
Then (sorry, this is kind of brute force), compute $2\cdot10^b\bmod19$ for increasing $b$, using the following rules:
Then the successive remainders starting from $b=1$ are
$$1,10,5,12,6,3,11,15,17,18,9,14,7,13,16,8,4,2,1\cdots$$
and $b=17$.
The number is $$105263157894736842$$