This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A284904 #17 Nov 16 2023 19:04:19 %S A284904 0,0,1,2,5,10,20,40,80,150,280,522,965,1802,3393,6426,12197,23236, %T A284904 44419,85116,163543,314837,607440,1174134,2273619,4409116,8561931, %U A284904 16646790,32404446,63145533,123173667 %N A284904 The number of integers k less than 2^n whose decimal representation of their reciprocals has an odd period. %C A284904 The number of terms in A284601 less than 2^n. %H A284904 <a href="/index/1#1overn">Index entries for sequences related to decimal expansion of 1/n</a> %F A284904 log(a(n)) is approximately 0.33 + 0.727*n - 0.643*sqrt(n). %e A284904 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. %t A284904 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 *) %t A284904 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}] %Y A284904 Cf. A284601. %K A284904 nonn %O A284904 0,4 %A A284904 _Robert G. Wilson v_, Apr 05 2017