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.

A008906 Number of digits in n! excluding final zeros.

Original entry on oeis.org

1, 1, 1, 1, 2, 2, 2, 3, 4, 5, 5, 6, 7, 8, 9, 10, 11, 12, 13, 15, 15, 16, 18, 19, 20, 20, 21, 23, 24, 25, 26, 27, 29, 30, 32, 33, 34, 36, 37, 39, 39, 41, 43, 44, 46, 47, 48, 50, 52, 53, 53, 55, 56, 58, 60, 61, 62, 64, 66, 68, 68, 70, 72, 74, 76, 76, 78, 80, 82, 84, 85, 86, 88, 90, 92, 92, 94
Offset: 0

Views

Author

Keywords

Comments

From Bernard Schott, Nov 19 2021: (Start)
a(n) < n iff 2 <= n <= 38 or n = 40;
a(n) = n iff n = 1, 39, 41;
a(n) > n iff n = 0 or n >= 42. (End)

Crossrefs

Programs

  • Mathematica
    Array[IntegerLength[#!//.x_/;x~Mod~10==0:>x/10]&,77,0] (* Giorgos Kalogeropoulos, Nov 19 2021 *)
  • Python
    from math import factorial
    def A008906(n): return len(str(factorial(n)).rstrip('0')) # Chai Wah Wu, Oct 24 2021

Formula

a(n) = A034886(n) - A027868(n). - Michel Marcus, Jun 24 2013