The decimal expansion of 1/271 repeats with a period of length 5:
.003690036900369 ...
However, it is not the smallest number q for which the decimal expansion of 1/q has a repetition length of 5.
Find the smallest q so that the decimal expansion of 1/q has repetition length n for each of {1, 2, ..., 10}
Is there a simple way of finding such a number?
If 1/X= 0.YYYY... and Y is a D digit number, then 1/X= Y(10^-D+10^-2D+10^-3D+...)= Y/(10^D-1), so (10^D-1)/X=Y.
For example, for D=1, 10^1-1 is a multiple of 1, of 3, and of 9, so these three numbers have a period length of 1.
For D=2, 10^2-1 is a multiple of 11 (we already dealt with 1, 3, and 9), so 1/11 has a period length of 2.
For D=3, 10^3-1 is a multiple of 37 (other divisors were already considered) so 1/37 has a period length of 3.
For D=4, 10^4-1 is a multiple of 101, so 1/101 has a period length of 4.
Finally, for D=5, 10^5-1 is a multiple of 41, so
1/41 has a period length of 5.
To continue, for D=6, since 10^6-1 is a multiple of 7, we find the well known result that 1/7 has a period length of 6: 1/7=0. 142857 142857 ...
Finally, for D=7, X=239; for D=8, X=273; for D=9, X=333667, and for D=10, X=271.
Edited on September 26, 2006, 11:05 am