g | x | w | all
Bytes Lang Time Link
058Wolfram Language Mathematica190925T010854Zatt
113Raku Perl 6 rakudo exact240803T190942Zbb94
071Perl 5 MPOSIX=log2 M5.01 n190925T071233ZNahuel F
025MATL190925T101721ZLuis Men
01805AB1E190925T104717ZGrimmy
078JavaScript V8190925T075730ZShieru A
108Clean190925T004946ZΟurous
092Python 2190925T004909Zxnor

Wolfram Language (Mathematica), 62 60 58 bytes

Denominator@Table[a=#~Rationalize~Abs[#-a]&@Log2@3,a=1;#]&

Try it online!

Raku (Perl 6) (rakudo) (exact), 113 bytes

{$/=(0,2);(grep {$1**$_>(my$d=min map {1/$_ max$_},((2 X**^$_)X*(⅔.FatRat**$_)))**$0&&($/=($_,$d))},1..*)[^$_]}

Attempt This Online!

Raku (Perl 6) (rakudo) (approximate), 77 bytes

{$!=1;(grep {$!>(my$d=min ((^$_ X/$_)X+⅔.log2)>>.abs)&&($!=$d)},1..*)[^$_]}

Attempt This Online!

Perl 5 (-MPOSIX=log2 -M5.01 -n), 73, 78, 71 bytes

Fixed following comment, may be improved...

-7 bytes thanks to Grimy

$o=abs$d-(0|.5+($d=log2 3)*++$;)/$;;$@=$o,$_-=say$;if!$@|$o<$@;$_&&redo

Try it online!

MATL, 27 25 bytes

1`@:@/Q3Zl-|X<hY<tdzG-}df

Try it online!

Explanation

1       % Push 1. This initiallizes the vector of distances
  `     % Do...while
  @:    %   Range [1, 2, ..., k], where k is the iteration index, staring at 1
  @/    %   Divide by k, element-wise. Gives [1/k, 2/k, ..., 1]
  Q     %   Add 1, element-wise. Gives [(k+1/k, (k+2)/k, ..., 2]
  3Zl   %   Push log2(3)
  -|    %   Absolute difference, element-wise
  X<    %   Minimum
  h     %   Concatenate with vector of previous distances
  Y<    %   Cumulative minimum
  t     %   Duplicate
  dz    %   Consecutive differences, number of nonzeros. This tells how many
        %   times the cumulative minimum has decreased
  G-    %   Subtract input n. This is the loop condition. 0 means we are done
}       % Finally (execute on loop exit)
  d     %   Consecutive differences (of the vector of cumulative differences)
  f     %   Indices of nonzeros. This is the final result
        % End. A new iteration is executed if the top of the stack is nonzero
        % Implicit display

05AB1E, 19 18 bytes

µ¯ßNLN/3.²<αßDˆ›D–

Try it online!

µ                      # repeat until counter == input
 ¯                     #  push the global array
  ß                    #  get the minimum (let's call it M)
   N                   #  1-based iteration count
    L                  #  range 1..N
     N/                #  divide each by N
       3.²             #  log2(3)
          <            #  -1
           α           #  absolute difference with each element of the range
            ß          #  get the minimum
             Dˆ        #  add a copy to the global array
               ›       #  is M strictly greater than this new minimum?
                D–     #  if true, print N
                       #  implicit: if true, add 1 to the counter

JavaScript (V8), 81 80 78 bytes

-2 bytes thanks Arnauld!

n=>{for(d=g=1;w=Math.log2(3),w+=~(w*g-.5)/g,n--;g++)w*w<d?d=print(g)||w*w:n++}

Try it online!

Clean, 128 111 108 bytes

import StdEnv
c=ln 3.0/ln 2.0
?d=abs(toReal(toInt(c*d))/d-c)
$i=take i(iterate(\d=until((>)(?d)o?)inc d)1.0)

Try it online!

Should work up to the limits of Real's 64-bit double precision type.

Python 2, 92 bytes

E=k=input()
n=0
while k:
 n+=1;e=abs((3.169925001442312*n-1)%2-1)/n
 if e<E:print n;E=e;k-=1

Try it online!

Uses the constant 3.169925001442312 for \$2 \log_2(3)\$. I wasn't sure how many digits of accuracy are required, since the inaccuracy will break the sequence eventually, so I used the full float precision of 2 * numpy.log2(3).