This site is supported by donations to The OEIS Foundation.

Annual Appeal: Today, Nov 11 2014, is the 4th anniversary of the launch of the new OEIS web site. 70,000 sequences have been added in these four years, all edited by volunteers. Please make a donation (tax deductible in the US) to help keep the OEIS running.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A121341 Number of decimal places before 1/n either recurs or terminates. 5
 0, 1, 1, 2, 1, 2, 6, 3, 1, 1, 2, 3, 6, 7, 2, 4, 16, 2, 18, 2, 6, 3, 22, 4, 2, 7, 3, 8, 28, 2, 15, 5, 2, 17, 7, 3, 3, 19, 6, 3, 5, 7, 21, 4, 2, 23, 46, 5, 42, 2, 16, 8, 13, 4, 3, 9, 18, 29, 58, 3, 60, 16, 6, 6, 7, 3, 33, 18, 22, 7, 35, 4, 8, 4, 3, 20, 6, 7, 13, 4, 9, 6, 41, 8, 17, 22, 28, 5, 44, 2, 6 (list; graph; refs; listen; history; text; internal format)
 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 EXAMPLE 1/592=0.0016891891891... starts with 4 decimals (0016, zeros counted) and has period 3 (decimals 891) to yield a(592)=4+3=7. MATHEMATICA EndingZeros[rep_List] := Module[{cnt=0, i=Length[rep]}, While[rep[[i]]==0, i--; cnt++ ]; cnt]; a[n_Integer] := Module[{lst, e, rep, len, initDigits}, {lst, e}=RealDigits[1/n]; If[VectorQ[lst], len=Length[lst]-e, rep=lst[[ -1]]; initDigits=Length[lst]-1; len=initDigits+Length[rep]-e-EndingZeros[rep]]; len]; Table[a[n], {n, 100}] CROSSREFS A007732 is the length of the periods and serves as a lower bound. Cf. A061075. Sequence in context: A053448 A060550 A099206 * A241737 A174959 A126093 Adjacent sequences:  A121338 A121339 A121340 * A121342 A121343 A121344 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

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Superseeker | Recent | More pages
The OEIS Community | Maintained by The OEIS Foundation Inc.

Content is available under The OEIS End-User License Agreement .