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

 


Nearest integer to log n.
10

%I #19 Jun 28 2024 05:26:18

%S 0,1,1,1,2,2,2,2,2,2,2,2,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,4,

%T 4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,

%U 4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4

%N Nearest integer to log n.

%H T. D. Noe, <a href="/A000193/b000193.txt">Table of n, a(n) for n=1..10000</a>

%p Digits := 100; f := n->round(evalf(log(n))); [ seq(f(n), n=1..100) ];

%t Round[Log[Range[100]]] (* _Paolo Xausa_, Jun 28 2024 *)

%o (PARI) a(n)=round(log(n))

%o (Haskell)

%o a000193 = round . log . fromIntegral -- _Reinhard Zumkeller_, Mar 17 2015

%Y Cf. A000195, A004233.

%K nonn,easy

%O 1,5

%A _N. J. A. Sloane_

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | 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 22 19:23 EDT 2024. Contains 376138 sequences. (Running on oeis4.)