cp's OEIS Frontend

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.

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

This page as a plain text file.
%I A307099 #26 Nov 13 2024 16:30:17
%S A307099 3,10,51,189,227,356,578,677,996,3389,38997,69096,149462,2208495,
%T A307099 3459604,4952236,6710605,48098656,81762222,419495413
%N A307099 Positive integers k at which k/log_2(k) is at a record closeness to an integer, without actually being an integer.
%C A307099 The closeness of a real number x to an integer is measured as abs(x-round(x)).
%C A307099 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 A307099 k/log_2(k) is an integer iff k is in A001146, so these integers are ignored.
%e A307099 10/log_2(10) = 3.010... ~ 3, which is an integer. Or, 2^10 = 1024, which is close to 1000 = 10^3.
%e A307099 996/log_2(996) = 99.99998060...
%t A307099 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 A307099 (Python)
%o A307099 from math import floor,ceil,log
%o A307099 x=2
%o A307099 mindif=1
%o A307099 while True:
%o A307099     logn=x/log(x,2)
%o A307099     dif=min(logn-floor(logn),ceil(logn)-logn)
%o A307099     if dif!=0 and mindif>dif:
%o A307099         mindif=dif
%o A307099         print(x,end=", ")
%o A307099     x+=1
%Y A307099 Cf. A001146.
%K A307099 nonn,more
%O A307099 1,1
%A A307099 _Alex Costea_, Mar 24 2019