login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A258782 Nearest integer to log_2(n!). 1
0, 0, 1, 3, 5, 7, 9, 12, 15, 18, 22, 25, 29, 33, 36, 40, 44, 48, 53, 57, 61, 65, 70, 74, 79, 84, 88, 93, 98, 103, 108, 113, 118, 123, 128, 133, 138, 143, 149, 154, 159, 165, 170, 175, 181, 186, 192, 197, 203, 209, 214, 220, 226, 231, 237, 243, 249, 254, 260, 266, 272, 278, 284, 290, 296, 302, 308, 314 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,4

LINKS

Table of n, a(n) for n=0..67.

FORMULA

a(n) = round(log_2(n!)).

a(n) = A004257(A000142(n)). - Michel Marcus, Jun 10 2015

a(n) = round(Sum_{k=1..n} log_2(k)). - Tom Edgar, Jun 10 2015

a(n) is within 1 of n*(log(n)-1)/log(2) + log(n)/(2*log(2)) + log(sqrt(2*Pi))/log(2) for n >= 1. - Robert Israel, Jun 10 2015

EXAMPLE

a(6) = round(log_2(6!)) = round(9.49...) = 9.

MAPLE

seq(round(lnGAMMA(n+1)/ln(2)), n=0..100); # Robert Israel, Jun 10 2015

MATHEMATICA

Round[Log[2, Range[0, 100]! ]] (* Giovanni Resta, Jun 10 2015 *)

PROG

(MATLAB) for i = 1:20 { disp(round(log2(factorial(i)))) } end

(PARI) a(n) = round(log(n!)/log(2)); \\ Michel Marcus, Jun 10 2015

(PARI) a(n)=round(lngamma(n+1)/log(2)) \\ Charles R Greathouse IV, Jun 10 2015

(MAGMA) [Round(LogGamma(n+1)/Log(2)): n in [0..70]]; // Bruno Berselli, Jun 23 2015

(Sage) [round(log_gamma(n+1)/log2) for n in (0..70)] # Bruno Berselli, Jun 23 2015

CROSSREFS

Cf. A025201, A067850.

Sequence in context: A204206 A080751 A025218 * A007078 A226332 A226331

Adjacent sequences:  A258779 A258780 A258781 * A258783 A258784 A258785

KEYWORD

nonn,easy

AUTHOR

Eli Sadoff, Jun 10 2015

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 August 19 04:59 EDT 2019. Contains 326109 sequences. (Running on oeis4.)