Find the smallest positive integer such that when its last digit is moved to the start of the number (example: 1234 becomes 4123) the resulting number is larger than and is an integral multiple of the original number. Numbers are written in standard decimal notation, with no leading zeroes.

Suppose the n-digit integer s = a_{1}a_{2}a_{3}...a_{n} is multiplied by k when the digit a_{n} is transferred to the beginning of the number. (That is, t = a_{n}a_{1}a_{2}...a_{n−1} = ks, where t is the resulting number.)

Note that we must have a_{1} > 0, since s is written with no leading zeroes; and a_{n} > 1, so that when a_{n} is transferred to the beginning of the number, the resulting number is two or more times the original number.

Consider the infinite repeating decimals x = 0.a_{1}a_{2}a_{3}...a_{n}a_{1}a_{2}a_{3}...a_{n}... and y = 0.a_{n}a_{1}a_{2}...a_{n−1}a_{n}a_{1}a_{2}...a_{n−1}... , formed by repeating s and t, respectively.

We have 0.a_{1}a_{2}a_{3}...a_{n} = s/10^{n}, and so x = s/(10^{n} − 1). (This follows by considering x as the sum to infinity of a geometric series.)

Similarly, we have 0.a_{n}a_{1}a_{2}...a_{n−1} = t/10^{n} = ks/10^{n}, and so y = ks/(10^{n} − 1).

Hence y = kx.

Clearly, we also have y = a_{n}/10 + x/10, or 10y = a_{n} + x.

Therefore 10kx = a_{n} + x, from which x = a_{n}/(10k − 1).

We have thus reduced the problem to one of trial and error for various values of a_{n} and k, neither of which can be greater than 9.

We must also have a_{n} k. For each value of k, we obtain the smallest value of x (and therefore of s) when a_{n} = k.

Testing each value of k/(10k − 1), for 2 k 9, we find the smallest s occurs for k = 4, when 4/39 yields 102564.

Hence the smallest positive integer such that when its last digit is moved to the start of the number the resulting number is larger than and is an integral multiple of the original number, is 102564.

Source: Traditional