OFFSET
0,4
COMMENTS
The number of terms in A284601 less than 2^n.
FORMULA
log(a(n)) is approximately 0.33 + 0.727*n - 0.643*sqrt(n).
EXAMPLE
a(5)=10 because the reciprocals of {3, 6, 9, 12, 15, 18, 24, 27, 30, 31} all have an odd period, i.e., {1, 1, 1, 1, 1, 1, 1, 3, 1, 15}, respectively.
MATHEMATICA
f[n_] := Mod[ Length[ RealDigits[1/n][[1, -1]]], 2]; s = 0; k = 1; lst = {}; Do[ While[k < 2^n, s += f@k; k++]; AppendTo[lst, s], {n, 0, 18}] (* or *)
g[n_] := Mod[ MultiplicativeOrder[10, FixedPoint[ Quotient[#, GCD[#, 10]] &, n]], 2]; h[n_] := Length@ Most@ Flatten@ Table[2^i*5^j, {i, 0, n}, {j, 0, Log[5, 2^(n -i)]}]; s = 0; k = 1; lst = {}; Do[ While[k < 2^n, s += g@k; k++]; AppendTo[lst, s - h[n]], {n, 0, 30}]
CROSSREFS
KEYWORD
nonn
AUTHOR
Robert G. Wilson v, Apr 05 2017
STATUS
approved