login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A307099 Positive integers k at which k/log_2(k) is at a record closeness to an integer, without actually being an integer. 0

%I #23 Jul 09 2019 10:51:34

%S 3,10,51,189,227,356,578,677,996,3389,38997,69096,149462,2208495,

%T 3459604,4952236,6710605,48098656,81762222,419495413

%N Positive integers k at which k/log_2(k) is at a record closeness to an integer, without actually being an integer.

%C The closeness of a real number x to an integer is measured as abs(x-round(x)).

%C 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).

%C k/log_2(k) is an integer iff k is in A001146, so these integers are ignored.

%e 10/log_2(10) = 3.010... ~ 3, which is an integer. Or, 2^10 = 1024, which is close to 1000 = 10^3.

%e 996/log_2(996) = 99.99998060...

%t 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 *)

%o (Python 3)

%o from math import floor,ceil,log

%o x=2

%o mindif=1

%o while True:

%o logn=x/log(x,2)

%o dif=min(logn-floor(logn),ceil(logn)-logn)

%o if dif!=0 and mindif>dif:

%o mindif=dif

%o print(x,end=", ")

%o x+=1

%Y Cf. A001146.

%K nonn,more

%O 1,1

%A _Alex Costea_, Mar 24 2019

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified September 15 06:50 EDT 2024. Contains 375931 sequences. (Running on oeis4.)