login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A333332 Positive numbers k at which min{abs(2^k - 10^y)/10^y: y in Z} reaches a new minimum. 0
1, 2, 3, 10, 93, 196, 485, 2136, 13301, 28738, 42039, 70777, 254370, 325147, 6107016, 6432163, 44699994, 51132157, 146964308, 198096465, 345060773, 1578339557, 1923400330, 82361153417, 496090320832, 578451474249, 2809896217828, 6198243909905, 21404627947543 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,2

COMMENTS

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

LINKS

Table of n, a(n) for n=1..29.

PROG

(Python)

def closest_powers_of_2_to_10(n):

  smallest_error = 1

  a = []

  r = 0.2 # ratio test starts at 2/10

  k = 1

  while len(a) < n:

    error = abs(1-r)

    if error < smallest_error:

      smallest_error = error

      a.append(k)

      print(a)

    if r<1.0:

      r *= 2

    else:

      r /= 10

      k -= 1 # need to check the other power of 10

    k += 1

  return a

print(closest_powers_of_2_to_10(20))

CROSSREFS

Cf. A046104, A073733.

Sequence in context: A088222 A184249 A270356 * A229220 A155148 A076927

Adjacent sequences:  A333329 A333330 A333331 * A333333 A333334 A333335

KEYWORD

nonn

AUTHOR

Zachary Hervieux-Moore, Mar 15 2020

EXTENSIONS

More terms from Hugo Pfoertner, May 01 2020

STATUS

approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 14 22:40 EDT 2021. Contains 343909 sequences. (Running on oeis4.)