A338753 Number of integers less than n with the same period of reciprocal as n.
0, 1, 0, 2, 3, 1, 0, 4, 2, 5, 0, 3, 1, 2, 4, 6, 0, 5, 0, 7, 3, 1, 0, 6, 8, 4, 0, 5, 0, 7, 0, 9, 2, 1, 6, 8, 1, 1, 7, 10, 0, 8, 0, 3, 9, 1, 0, 10, 0, 11, 2, 9, 0, 2, 4, 10, 2, 1, 0, 11, 0, 1, 11, 12, 12, 5, 0, 3, 2, 13, 0, 12, 0, 3, 13, 3, 14, 15, 1, 13, 0, 1, 0, 16, 4, 1, 2, 6, 0, 14
Offset: 1
Examples
a(14) = 2 because A051626(14) = 6 and also A051626(7) = A051626(13) = 6. More specifically, 1/7 = 0.142857(142857)... (period 6), 1/13 = 0.076923(076923)... (period 6), 1/14 = 0.0714285(714285)... (period 6).
Links
- Eric Weisstein's World of Mathematics, Repeating Decimal
- Index entries for sequences related to decimal expansion of 1/n
Crossrefs
Cf. A051626.
Programs
-
Mathematica
Table[Length[Select[Range[n - 1], Length[RealDigits[1/#][[1, -1]]] == Length[RealDigits[1/n][[1, -1]]] &]], {n, 90}]