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 A333332 #40 May 02 2020 07:00:31 %S A333332 1,2,3,10,93,196,485,2136,13301,28738,42039,70777,254370,325147, %T A333332 6107016,6432163,44699994,51132157,146964308,198096465,345060773, %U A333332 1578339557,1923400330,82361153417,496090320832,578451474249,2809896217828,6198243909905,21404627947543 %N A333332 Positive numbers k at which min{abs(2^k - 10^y)/10^y: y in Z} reaches a new minimum. %C A333332 If {k(n)/y(n)} are the convergent fractions to log_2(10), then numerators k(n) are in A073733, and denominators y(n) are in A046104; now, k and y means k(n) and y(n): k/y ~ log_2(10) <==> 2^(k/y) ~ 10 <==> 2^k ~ 10^y <==> lim_{n->oo} (2^k / 10^y) = 1 <==> lim_{n->oo} abs(2^k/10^y - 1) = 0 <==> lim_{n->oo} abs(2^k - 10^y)/10^y = 0, that corresponds to the name. - _Bernard Schott_, Apr 29 2020 %o A333332 (Python) %o A333332 def closest_powers_of_2_to_10(n): %o A333332 smallest_error = 1 %o A333332 a = [] %o A333332 r = 0.2 # ratio test starts at 2/10 %o A333332 k = 1 %o A333332 while len(a) < n: %o A333332 error = abs(1-r) %o A333332 if error < smallest_error: %o A333332 smallest_error = error %o A333332 a.append(k) %o A333332 print(a) %o A333332 if r<1.0: %o A333332 r *= 2 %o A333332 else: %o A333332 r /= 10 %o A333332 k -= 1 # need to check the other power of 10 %o A333332 k += 1 %o A333332 return a %o A333332 print(closest_powers_of_2_to_10(20)) %Y A333332 Cf. A046104, A073733. %K A333332 nonn %O A333332 1,2 %A A333332 _Zachary Hervieux-Moore_, Mar 15 2020 %E A333332 More terms from _Hugo Pfoertner_, May 01 2020