Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
A060151
Number of base n digits required to write n!.
11
1, 2, 2, 3, 3, 4, 5, 6, 6, 7, 8, 9, 9, 10, 11, 12, 12, 13, 14, 15, 15, 16, 17, 18, 19, 19, 20, 21, 22, 22, 23, 24, 25, 26, 26, 27, 28, 29, 30, 30, 31, 32, 33, 34, 34, 35, 36, 37, 38, 38, 39, 40, 41, 42, 43, 43, 44, 45, 46, 47, 47, 48, 49, 50, 51, 51, 52, 53, 54, 55, 56, 56, 57
OFFSET
1,2
LINKS
Harry J. Smith and Danny Rorabaugh, Table of n, a(n) for n = 1..10000 (first 1000 terms from Harry J. Smith)
FORMULA
a(n) = 1 + floor(log(n!)/log(n)) = 1 + A039960(n) for n>1.
From Danny Rorabaugh, Apr 14 2015: (Start)
a(n) = 1 + log_n(A074182(n)) for n>1.
a(n) = A074184(n) = log_n(A074181(n)) for n>2.
(End)
a(n) = n - n/log n + O(1). - Charles R Greathouse IV, Oct 29 2016
EXAMPLE
a(6)=4 since 6!=720, which in base 6 is 3200.
MATHEMATICA
Join[{1}, Table[IntegerLength[n!, n], {n, 2, 80}]] (* Harvey P. Dale, May 30 2014 *)
PROG
(PARI) default(realprecision, 10); for (n=1, 1000, if (n==1, a=1, a=1 + floor(log(n!)/log(n))); write("b060151.txt", n, " ", a)) \\ Harry J. Smith, Jul 02 2009
(PARI) a(n)=if(n>1, logint(n!, n), 1) \\ Charles R Greathouse IV, Oct 29 2016
(PARI) a(n)=if(n>1, lngamma(n+1)\log(n))+1 \\ Charles R Greathouse IV, Oct 29 2016
(Sage) [1] + [1 + floor(log(factorial(n))/log(n)) for n in range(2, 74)] # Danny Rorabaugh, Apr 14 2015
(Magma) [1] cat [1 + Floor(Log(Factorial(n))/Log(n)): n in [2..80]]; // Vincenzo Librandi, Apr 15 2015
CROSSREFS
Cf. A011776 for number of final zeros of n! written in base n.
Sequence in context: A156253 A346693 A265436 * A285902 A097330 A086861
KEYWORD
base,nonn,easy
AUTHOR
Henry Bottomley, Mar 08 2001
STATUS
approved