OFFSET
1,4
COMMENTS
In this sequence, the repeating decimals (e.g., 1/7) are treated differently from nonrepeating decimals (e.g., 1/5). If they are treated the same, then a(2)=2, a(4)=3, a(5)=2, a(8)=4, a(10)=2, ... and we obtain A054710. The two sequence differ only for n = 2^j * 5^k.
LINKS
T. D. Noe, Table of n, a(n) for n = 1..1000 (corrected by Sean A. Irvine, Apr 29 2022)
FORMULA
EXAMPLE
1/592 = 0.0016891891891... starts with 4 decimals (0016, zeros counted) and has period 3 (digits 891) to yield a(592) = 4 + 3 = 7.
MATHEMATICA
a[n_] := Max[IntegerExponent[n, 2], IntegerExponent[n, 5]] + Length[RealDigits[1/n][[1, -1]]];
Table[a[n], {n, 1, 100}] (* Jean-François Alcover, Jul 20 2022 *)
CROSSREFS
KEYWORD
base,easy,nice,nonn
AUTHOR
Anthony C Robin, Aug 29 2006
EXTENSIONS
More terms from T. D. Noe, Aug 30 2006
Additional comments from R. J. Mathar, Aug 30 2006
STATUS
approved