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.

Showing 1-5 of 5 results.

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

Original entry on oeis.org

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

Views

Author

Henry Bottomley, Mar 08 2001

Keywords

Examples

			a(6)=4 since 6!=720, which in base 6 is 3200.
		

Crossrefs

Cf. A011776 for number of final zeros of n! written in base n.

Programs

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

A074184 Index of the smallest power of n >= n!.

Original entry on oeis.org

1, 1, 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

Views

Author

Amarnath Murthy, Aug 31 2002

Keywords

Comments

Essentially the same as A060151. - R. J. Mathar, Dec 15 2008

Crossrefs

Programs

  • Magma
    [1] cat [Ceiling(Log(Factorial(n))/Log(n)): n in [2..80]]; // Vincenzo Librandi, Apr 15 2015
    
  • PARI
    a(n)=if(n>2,lngamma(n+1)\log(n))+1 \\ Charles R Greathouse IV, Sep 02 2015
  • Sage
    [1]+[ceil(log(factorial(n))/log(n)) for n in range(2, 74)] # Danny Rorabaugh, Apr 14 2015
    

Formula

From Danny Rorabaugh, Apr 14 2015: (Start)
a(n) = log_n(A074181(n)).
a(n) = ceiling(log_n(n!)) for n>1.
a(n) = A060151(n) = 1 + A039960(n) = 1 + log_n(A074182(n)) for n>2.
(End)

Extensions

More terms from Jason Earls, Sep 02 2002

A039960 For n >= 2, a(n) = largest value of k such that n^k is <= n! (a(0) = a(1) = 1 by convention).

Original entry on oeis.org

1, 1, 1, 1, 2, 2, 3, 4, 5, 5, 6, 7, 8, 8, 9, 10, 11, 11, 12, 13, 14, 14, 15, 16, 17, 18, 18, 19, 20, 21, 21, 22, 23, 24, 25, 25, 26, 27, 28, 29, 29, 30, 31, 32, 33, 33, 34, 35, 36, 37, 37, 38, 39, 40, 41, 42, 42, 43, 44, 45, 46, 46, 47, 48, 49, 50, 50, 51, 52, 53, 54, 55, 55, 56, 57
Offset: 0

Views

Author

Dan Bentley (bentini(AT)yahoo.com)

Keywords

Comments

Seems to be slightly more than (but asymptotic to) number of nonprimes less than or equal to n.

Examples

			a(7)=4 because 7! = 5040, 7^4 = 2401 but 7^5 = 16807.
a(6)=3 since 6^3.67195... = 720 = 6! and 6^3 <= 6! < 6^4, i.e., 216 <= 720 < 1296.
		

Crossrefs

Programs

  • Magma
    [1,1] cat [Floor(Log(Factorial(n))/Log(n)): n in [2..80]]; // Vincenzo Librandi, Apr 15 2015
    
  • Mathematica
    ds[x_, y_] :=y!-y^x; a[n_] :=Block[{m=1, s=ds[m, n]}, While[Sign[s]!=-1&&!Greater[m, 256], m++ ];m]; Table[a[n]-1, {n, 3, 200}]
    (* or *)
    Table[Count[Part[Sign[Table[Table[n!-n^j, {j, 1, 128}], {n, 1, 128}]], u], 1], {u, 1, 128}] (* Labos Elemer *)
    Join[{1,1},Table[Floor[Log[n,n!]],{n,2,80}]] (* Harvey P. Dale, Sep 24 2019 *)
  • PARI
    a(n)=if(n>3,lngamma(n+1)\log(n),1) \\ Charles R Greathouse IV, Sep 02 2015
  • Sage
    [1,1] + [floor(log(factorial(n))/log(n)) for n in range(2,75)] # Danny Rorabaugh, Apr 14 2015
    

Formula

a(n) = floor(log_n(n!)) for n > 1.
a(n) = A060151(n) - 1 for n > 1. - Henry Bottomley, Mar 08 2001
From Danny Rorabaugh, Apr 14 2015: (Start)
a(n) = log_n(A074182(n)) for n > 1.
a(n) = A074184 - 1 = log_n(A074181(n)) - 1 for n > 2. (End)
From Robert Israel, Apr 14 2015: (Start)
n*(1-1/log(n)) + 1 > log(n!)/log(n) > n*(1-1/log(n)) for n >= 7.
Thus a(n) is either floor(n*(1-1/log(n))) or ceiling(n*(1-1/log(n))) for n >= 7 (and in fact this is the case for n >= 3). (End)

Extensions

Corrected and extended by Henry Bottomley, Mar 08 2001
Edited by N. J. A. Sloane, Sep 26 2008 at the suggestion of R. J. Mathar

A074181 Smallest power of n >= n!.

Original entry on oeis.org

1, 2, 9, 64, 125, 1296, 16807, 262144, 531441, 10000000, 214358881, 5159780352, 10604499373, 289254654976, 8649755859375, 281474976710656, 582622237229761, 20822964865671168, 799006685782884121
Offset: 1

Views

Author

Amarnath Murthy, Aug 31 2002

Keywords

Crossrefs

Cf. A074182.

Programs

  • Mathematica
    Join[{1},Table[n^Ceiling[Log[n,n!]],{n,2,20}]] (* Harvey P. Dale, Aug 10 2022 *)
  • PARI
    a(n)=if(n>2,n^(logint(n!,n)+1),n) \\ Charles R Greathouse IV, Oct 11 2015
  • Sage
    [1]+[n^ceil(log(factorial(n))/log(n)) for n in range(2,20)] # Danny Rorabaugh, Apr 14 2015
    

Formula

From Danny Rorabaugh, Apr 14 2015: (Start)
a(n) = n^A074184(n).
a(n) = n^ceiling(log_n(n!)) for n>1.
a(n) = n*A074182(n) = n^A060151(n) = n^(1 + A039960(n)) = n! + A111683(n) for n>2.
(End)

Extensions

More terms from Jason Earls, Sep 02 2002

A256774 All factorials n! along with powers of the numbers n and n+1 that fall in between n! and (n+1)!, in increasing order.

Original entry on oeis.org

1, 2, 3, 4, 6, 9, 16, 24, 25, 64, 120, 125, 216, 625, 720, 1296, 2401, 5040, 16807, 32768, 40320, 59049, 262144, 362880, 531441, 1000000, 3628800, 10000000, 19487171, 39916800, 214358881, 429981696, 479001600, 815730721, 5159780352, 6227020800, 10604499373, 20661046784, 87178291200, 289254654976
Offset: 1

Views

Author

Juan Castaneda, Apr 10 2015

Keywords

Comments

For each positive integer n, we consider the two factorials n! and (n+1)! as lower and upper bounds of an interval. Then we look for all powers of n and all powers of n+1 that fall inside that interval. We sort those numbers in increasing order, and we append them to the sequence without allowing duplicates. Then we move on to the next integer, and so on.
A000142 (without its first term that stands for 0!) is a subsequence.

Examples

			With n=1: 1! < 2! gives a(1)=1, a(2)=2.
With n=2: 2! < 3^1 < 2^2 < 3! gives a(3)=3, a(4)=4, a(5)=6.
With n=3: 3! < 3^2 < 4^2 < 4! gives a(6)=9, a(7)=16, a(8)=24.
With n=4: 4! < 5^2 < 4^3 < 5! gives a(9)=25, a(10)=64, a(11)=120.
With n=5: 5! < 5^3 < 6^3 < 5^4 < 6! gives a(12)=125, a(13)=216, a(14)=625, a(15)=720
		

Crossrefs

Programs

  • Mathematica
    f[n_] := Block[{a = n!, b = (n + 1)!}, Sort@ Union[{a}, n^Range[Ceiling@ Log[n, a], Floor@ Log[n, b]], (n + 1)^Range[Ceiling@ Log[n + 1, a], Floor@ Log[n + 1, b]]]]; {1}~Join~(f /@ Range[2, 14] // Flatten) (* Michael De Vlieger, Apr 15 2015 *)
  • PARI
    tabf(nn) = {print([1]); for (n=2, nn, v = [n!]; ka = ceil(log(n!+1)/log(n)); kb = floor(log((n+1)!-1)/log(n)); for (k=ka, kb, v = concat(v, n^k);); ka = ceil(log(n!+1)/log(n+1)); kb = floor(log((n+1)!-1)/log(n+1)); for (k=ka, kb, v = concat(v, (n+1)^k);); print(vecsort(v));); } \\ Michel Marcus, Apr 22 2015
Showing 1-5 of 5 results.