A176920 Period of decimal representation of 1/n^2.
1, 1, 1, 1, 1, 1, 42, 1, 9, 1, 22, 1, 78, 42, 1, 1, 272, 9, 342, 1, 42, 22, 506, 1, 1, 78, 81, 42, 812, 1, 465, 1, 22, 272, 42, 9, 111, 342, 78, 1, 205, 42, 903, 22, 9, 506, 2162, 1, 2058, 1, 272, 78, 689, 81, 22, 42, 342, 812, 3422, 1, 3660, 465, 126, 1, 78, 22, 2211, 272, 506
Offset: 1
Crossrefs
Cf. A007732
Programs
-
Mathematica
DigitCycleLength[r_Rational,b_Integer?Positive]:=MultiplicativeOrder[b,FixedPoint[Quotient[ #,GCD[ #,b]]&,Denominator[r]]];Table[If[n<2,1,DigitCycleLength[1/n^2,10]],{n,5!}]
Comments