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.

A060151 Number of base n digits required to write n!.

This page as a plain text file.
%I A060151 #38 Dec 08 2024 12:26:18
%S A060151 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,
%T A060151 21,22,22,23,24,25,26,26,27,28,29,30,30,31,32,33,34,34,35,36,37,38,38,
%U A060151 39,40,41,42,43,43,44,45,46,47,47,48,49,50,51,51,52,53,54,55,56,56,57
%N A060151 Number of base n digits required to write n!.
%H A060151 Harry J. Smith and Danny Rorabaugh, <a href="/A060151/b060151.txt">Table of n, a(n) for n = 1..10000</a> (first 1000 terms from Harry J. Smith)
%F A060151 a(n) = 1 + floor(log(n!)/log(n)) = 1 + A039960(n) for n>1.
%F A060151 From _Danny Rorabaugh_, Apr 14 2015: (Start)
%F A060151 a(n) = 1 + log_n(A074182(n)) for n>1.
%F A060151 a(n) = A074184(n) = log_n(A074181(n)) for n>2.
%F A060151 (End)
%F A060151 a(n) = n - n/log n + O(1). - _Charles R Greathouse IV_, Oct 29 2016
%e A060151 a(6)=4 since 6!=720, which in base 6 is 3200.
%t A060151 Join[{1},Table[IntegerLength[n!,n],{n,2,80}]] (* _Harvey P. Dale_, May 30 2014 *)
%o A060151 (PARI) a(n)=if(n>1, logint(n!,n), 1) \\ _Charles R Greathouse IV_, Oct 29 2016
%o A060151 (PARI) a(n)=if(n>1, lngamma(n+1)\log(n))+1 \\ _Charles R Greathouse IV_, Oct 29 2016
%o A060151 (Sage) [1] + [1 + floor(log(factorial(n))/log(n)) for n in range(2,74)] # _Danny Rorabaugh_, Apr 14 2015
%o A060151 (Magma) [1] cat [1 + Floor(Log(Factorial(n))/Log(n)): n in [2..80]]; // _Vincenzo Librandi_, Apr 15 2015
%Y A060151 Cf. A011776 for number of final zeros of n! written in base n.
%Y A060151 Cf. A039960, A074181-A074184.
%K A060151 base,nonn,easy
%O A060151 1,2
%A A060151 _Henry Bottomley_, Mar 08 2001