Rotated Multiples

When you multiply 102564 by 4, its rightmost digit moves to the left and the other digits move one space to the right (4 × 102564 = 410256). Find the smallest number that has this same property when multiplied by N (where N is each integer from 2 to 9.)  Some answers are surprisingly long.

Source: Based on Macalaster College Problem of the Week #1013.


Solutions were received from Philippe Fondanaiche, Kirk Bresniker, Denis Borris, Joseph DeVincentis, and Dan Chirica.  Philippe pointed out that I had a previous puzzle similar to this on February 3, 1999, and its solution lists all the solutions to this one.  Sorry 'bout that.  For this week, though, I think Joseph's solution is a good summary:
So we need to solve:
n(10a+b) = (10^k)b + a
where b is an integer 1 to 9 and a is an integer in [10^(k-1),10^k) and k is the
smallest integer where it has a solution, for each n from 2 to 9.

Solve for a:
a = b(10^k - n)/(10n-1)

So we need to find the smallest k such that 10^k - n is divisible by 10n-1, or 
at least by a large factor of 10n-1 in those cases (39, 49, 69) where it is not 
prime. This will generally be an order of magnitude less than 10^k, so then we 
need to find the smallest b so make a be at least 10^(k-1).

For n=2, we have to go up to k=17 to find 
a/b = 99999999999999998/19 = 5263157894736842.
Then b=2, a=10526315789473684, and 
2 * 105263157894736842 = 210526315789473684.

For n=3, we have to go up to k=27 to find 
a/b = 999999999999999999999999997/29 = 34482758620689655172413793. Then b=3, 
a = 103448275862068965517241379, and
3 * 1034482758620689655172413793 = 3103448275862068965517241379

For n=4, the denominator 39 = 3 * 13 so we may be able to get away with 
10^k - 4 only being a multiple of 13 if b is a multiple of 3. But since 
10^k - 4 = 999...9996, it is a multiple of 3 anyway. We find 
a/b = 99996/39 = 2564, b = 4, a = 102564, and 
4 * 102564 = 410256 as in the example.

For n=5, the denominator 49 = 7*7 so we may be able to get away with 
10^k - 5 is only divisible once by 7. Indeed, this turns up the short solution 
a/b = 99995/49 = 14285/7, b = 7, and
5 * 142857 = 714285.

For n=6, we have to go up to k=57 to find a/b =
999999999999999999999999999999999999999999999999999999994/59
 = 16949152542372881355932203389830508474576271186440677966. 
Then b=6, and
6 * 1016949152542372881355932203389830508474576271186440677966
 = 6101694915254237288135593220338983050847457627118644067796.

For n=7, the denominator 69 = 3 * 23, but as with the n=4 case, 
10^k - 7 is divisible by 3 so this doesn't reduce the size of the solution.
We need k=21, a/b = 999999999999999999993/69 = 14492753623188405797L.
Then b = 7, and 
7 * 1014492753623188405797 = 7101449275362318840579.

For n=8, k=12, a/b = 999999999992/79 = 12658227848. So b=8, and 
8 * 1012658227848 = 8101265822784.

For n=9, k=43, a/b = 9999999999999999999999999999999999999999991/89
 = 112359550561797752808988764044943820224719. b = 9, and
9 * 10112359550561797752808988764044943820224719
 = 91011235955056179775280898876404494382022471.

Mail to Ken