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!)
A345328 a(n) is the smallest integer k>1 such that |log(k)-round(log(k))| is smaller than 10^(-n). 1
3, 20, 1096, 2981, 59874, 442413, 8886110, 65659969, 178482301, 3584912846, 26489122130, 195729609429, 3931334297144, 78962960182680, 214643579785916, 4311231547115195, 31855931757113756, 86593400423993747, 12851600114359308275, 34934271057485095348 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

COMMENTS

In other words, a(n) is the smallest integer k>1 such that the distance between log(k) and nearest integer to log(k) is smaller than 10^(-n).

LINKS

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

EXAMPLE

For n=4 a(n)=2981, because 2981 is the smallest integer greater than 1 such that |log(2981)-round(2981)| = 0.00001409... < 10^(-4).

MAPLE

n := 1: for i from 2 to 10^10 do if abs(evalf(log(i)) - floor(log(i) + 1/2)) < 10^(-n) then print(i); n := n + 1 fi end do;

PROG

(C++) #include <iostream>

#include <cmath>

using namespace std; int main(int argc, char** argv) {long double n=1; int q=2; for(n=1; n<=9; n++){for(int i=q; i<=100000000000; i++){long double k=log(i); if(abs(k-round(k))<pow(10, -n)){cout<<i<<", "; q=i; break; }}}}

(PARI) \\ suitable precision needed.

a(n)={my(epsilon=1.0/10^n); for(k=1, oo, my(t=floor(exp(k))); if(k-log(t)<epsilon, while(k-log(t-1)<epsilon, t--); return(t)); if(log(t+1)-k<epsilon, return(t+1)))} \\ Andrew Howroyd, Jun 14 2021

CROSSREFS

Cf. A000193, A000227, A079663, A080021.

Sequence in context: A162134 A296408 A002857 * A203314 A174652 A024011

Adjacent sequences:  A345325 A345326 A345327 * A345329 A345330 A345331

KEYWORD

nonn

AUTHOR

Andrzej Kukla, Jun 14 2021

EXTENSIONS

Terms a(10) and beyond from Andrew Howroyd, Jun 14 2021

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 October 22 16:15 EDT 2021. Contains 348174 sequences. (Running on oeis4.)