I'm going to start by multiplying the numerator and denominator by 1/999...999 (n 9s) on the left side. Then we have
A1A2A3....An/999...999 12
---------------------- = --
A2A3....AnA1/999...999 17
When expanded in decimal form the numerator and denominator of the left fraction are repeating decimals of n digits.
Let the numerator be x, note that 0<x<1. Then the denominator can be written as 10*x-A1. Then x/(10*x-A1) = 12/17.
Now solve for x gives us x=12*A1/103 where A1 is a digit. A1=0 is degenerate and must be discarded and A1=9 also needs to be discarded as it makes x=108/103 which is greater than the upper bound of 1.
The smallest occurs at A1=1, x=12/103. When written as decimal it has a 34 digit repeating block, that block is then A1A2A3....An. Checking the other digits 2-8 also all have 34 digit blocks. So we can conclude that answer to the problem is n=34.