A179193 Sum of the number of repeating digits for each reciprocal of integer m, where 1 < m < n and n is the base.
0, 1, 1, 4, 1, 9, 9, 9, 9, 20, 15, 30, 22, 28, 23, 52, 33, 63, 58, 44, 65, 86, 84, 67, 68, 102, 135, 140, 74, 142, 171, 159, 142, 124, 88, 220, 204, 205, 238, 258, 209, 244, 231, 201, 245, 304, 328, 214, 291, 292, 465, 422, 380, 350, 422, 381, 507, 507, 417, 627
Offset: 2
Examples
7th term considers octal: the fractions 1/2, 1/3, 1/4, 1/5, 1/6 and 1/7 have 0, 2, 0, 4, 2 and 1 repeating (octal) digits respectively, for a total of 9. 9th term considers decimal: the fractions 1/2, 1/3, 1/4, 1/5, 1/6, 1/7, 1/8 and 1/9 have 0, 1, 0, 0, 1, 6, 0 and 1 repeating (decimal) digits respectively, for a total of 9.
Links
- Amiram Eldar, Table of n, a(n) for n = 2..10000
Crossrefs
Cf. A051626.
Programs
-
Mathematica
a[n_] := Sum[Length[RealDigits[1/k, n][[1, -1]]], {k, 2, n-1}]; Array[a, 100, 2] (* Amiram Eldar, Jun 28 2024 *)
Extensions
Data corrected and extended by Amiram Eldar, Jun 28 2024
Comments