A007740 Period of repeating digits of 1/n in base 9.
1, 1, 1, 1, 2, 1, 3, 1, 1, 2, 5, 1, 3, 3, 2, 2, 8, 1, 9, 2, 3, 5, 11, 1, 10, 3, 1, 3, 14, 2, 15, 4, 5, 8, 6, 1, 9, 9, 3, 2, 4, 3, 21, 5, 2, 11, 23, 2, 21, 10, 8, 3, 26, 1, 10, 3, 9, 14, 29, 2, 5, 15, 3, 8, 6, 5, 11, 8, 11, 6, 35, 1, 6, 9, 10, 9, 15, 3, 39, 2, 1, 4, 41, 3, 8, 21, 14, 5, 44, 2, 3, 11, 15, 23
Offset: 1
Links
Crossrefs
Programs
-
Mathematica
DigitCycleLength[r_Rational, b_Integer?Positive] := MultiplicativeOrder[b, FixedPoint[ Quotient[#, GCD[#, b]] &, Denominator[r]]]; DigitCycleLength[1, b_Integer?Positive] = 1; Array[ DigitCycleLength[1/#, 9] &, 80] (* Robert G. Wilson v, Jun 10 2011 *) a[n_] := MultiplicativeOrder[9, n/3^IntegerExponent[n, 3]]; Array[a, 100] (* Amiram Eldar, Aug 26 2024 *)
Comments