OFFSET
1,1
COMMENTS
The period p of 1/n is given by the smallest integer p for which 10^p == 1 (mod n). The periods of unit fractions are given by sequence A002329.
REFERENCES
J. W. L. Glaisher, On circulating decimals, Proc. Camb. Phil. Soc., 3 (1878), 185-206.
D. H. Lehmer, Guide to Tables in the Theory of Numbers. Bulletin No. 105, National Research Council, Washington, DC, 1941, pp. 7-12.
LINKS
Eric Weisstein's World of Mathematics, Decimal Expansion
Eric Weisstein's World of Mathematics, Multiplicative Order
EXAMPLE
period of 1/3 = 1;
period of 1/9 = 1;
period of 1/17 = 16;
period of 1/51 = 16.
MAPLE
with(numtheory):n0:=60: ii:=1:tabl:=array(1..n0+1): for n from 2 to 10000 do: for p from 1 to 10000 while(irem(10^p, n)<>1 or gcd(n, 10)<> 1) do: od: if irem(10^p, n) = 1 and gcd(n, 10) = 1 and sqrt(p) = floor(sqrt(p)) then tabl[ii]:=n:ii:=ii+1:else fi:od: print(tabl):
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Michel Lagneau, Feb 10 2010
EXTENSIONS
Title rephrased, more terms and Maple program added; corrected by T. D. Noe and edited by Michel Lagneau, Apr 26 2010
STATUS
approved