OFFSET
1,1
COMMENTS
The closeness of a real number x to an integer is measured as abs(x-round(x)).
k/log_2(k) can also be written as log(k,2^k). Thus, this is also where 2^k is at a record closeness to a power of k (logarithmically).
k/log_2(k) is an integer iff k is in A001146, so these integers are ignored.
EXAMPLE
10/log_2(10) = 3.010... ~ 3, which is an integer. Or, 2^10 = 1024, which is close to 1000 = 10^3.
996/log_2(996) = 99.99998060...
MATHEMATICA
With[{s = {-1}~Join~Array[-Abs[Round[#] - #] &[#/Log2[#]] /. 0 -> -1 &, 10^5, 2]}, Rest@ Map[FirstPosition[s, #][[1]] &, Union@ FoldList[Max, s]]] (* Michael De Vlieger, Mar 27 2019 *)
PROG
(Python 3)
from math import floor, ceil, log
x=2
mindif=1
while True:
logn=x/log(x, 2)
dif=min(logn-floor(logn), ceil(logn)-logn)
if dif!=0 and mindif>dif:
mindif=dif
print(x, end=", ")
x+=1
CROSSREFS
KEYWORD
nonn,more
AUTHOR
Alex Costea, Mar 24 2019
STATUS
approved