login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A114206
See A114205.
3
1, 0, 2, 1, 1, 0, 3, 0, 1, 1, 2, 1, 1, 1, 4, 1, 1, 1, 2, 1, 1, 1, 3, 2, 1, 1, 2, 1, 1, 1, 5, 1, 1, 1, 2, 1, 1, 1, 3, 1, 1, 1, 2, 1, 1, 1, 4, 1, 2, 1, 2, 1, 1, 1, 3, 1, 1, 1, 2, 1, 1, 1, 6, 1, 1, 1, 2, 1, 1, 1, 3, 1, 1, 2, 2, 1, 1, 1, 4, 1, 1, 1, 2, 1, 1, 1, 3, 1, 1, 1, 2, 1, 1, 1, 5, 1, 1, 1, 2
OFFSET
2,3
LINKS
MATHEMATICA
fb[n_] := Block[{rd, o, p}, rd = RealDigits[1/n]; o = Last[rd]; p = First[rd]; If[ ! IntegerQ[Last[p]], p = Most[p]]; Length[p] - o]; Table[fb[n], {n, 120}] (* Ray Chandler, Oct 18 2006 *)
r[x_]:=RealDigits[1/x]; w[x_]:=First[r[x]]; f[x_]:=First[w[x]]; l[x_]:=Last[w[x]]; z[x_]:=Last[r[x]]; b[x_]:=Which[IntegerQ[l[x]], Length[w[x]]-1*z[x], IntegerQ[f[x]]==False, -1*z[x], True, Length[Drop[w[x], -1]]-1*z[x]]; (* Hans Havermann, Oct 18 2006 *)
Table[b[i], {i, 2, 128}]
CROSSREFS
Cf. A114205.
Sequence in context: A163540 A127967 A147602 * A073202 A337345 A294904
KEYWORD
nonn
AUTHOR
N. J. A. Sloane, Oct 17 2006
EXTENSIONS
More terms from Ray Chandler and Hans Havermann, Oct 18 2006
STATUS
approved