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.

A084558 a(0) = 0; for n >= 1: a(n) = largest m such that n >= m!.

Original entry on oeis.org

0, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 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, 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, 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, 5
Offset: 0

Views

Author

Antti Karttunen, Jun 23 2003

Keywords

Comments

For n >= 1, a(n) = the number of significant digits in n's factorial base representation (A007623).
After zero, which occurs once, each n occurs A001563(n) times.
Number of iterations (...(f_4(f_3(f_2(n))))...) such that the result is < 1, where f_j(x):=x/j. - Hieronymus Fischer, Apr 30 2012
For n > 0: a(n) = length of row n in table A108731. - Reinhard Zumkeller, Jan 05 2014

Examples

			a(4) = 2 because 2! <= 4 < 3!.
		

References

  • F. Smarandache, "f-Inferior and f-Superior Functions - Generalization of Floor Functions", Arizona State University, Special Collections.

Crossrefs

Programs

  • Haskell
    a084558 n = a090529 (n + 1) - 1  -- Reinhard Zumkeller, Jan 05 2014
    
  • Maple
    0, seq(m$(m*m!),m=1..5); # Robert Israel, Apr 27 2015
  • Mathematica
    Table[m = 1; While[m! <= n, m++]; m - 1, {n, 0, 104}] (* Jayanta Basu, May 24 2013 *)
    Table[Floor[Last[Reduce[x! == n && x > 0, x]]], {n, 120}] (* Eric W. Weisstein, Sep 13 2024 *)
  • PARI
    a(n)={my(m=0);while(n\=m++,);m-1} \\ R. J. Cano, Apr 09 2018
    
  • Python
    def A084558(n):
      i=1
      while n: i+=1; n//=i
      return(i-1)
    print(list(map(A084558,range(101)))) # Natalia L. Skirrow, May 28 2023

Formula

From Hieronymus Fischer, Apr 30 2012: (Start)
a(n!) = a((n-1)!)+1, for n>1.
G.f.: 1/(1-x)*Sum_{k>=1} x^(k!).
The explicit first terms of the g.f. are: (x+x^2+x^6+x^24+x^120+x^720...)/(1-x).
(End)
Other identities:
For all n >= 0, a(n) = A090529(n+1) - 1. - Reinhard Zumkeller, Jan 05 2014
For all n >= 1, a(n) = A060130(n) + A257510(n). - Antti Karttunen, Apr 27 2015
a(n) ~ log(n^2/(2*Pi)) / (2*LambertW(log(n^2/(2*Pi))/(2*exp(1)))) - 1/2. - Vaclav Kotesovec, Aug 22 2025

Extensions

Name clarified by Antti Karttunen, Apr 27 2015