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.

A008905 Leading digit of n!.

Original entry on oeis.org

1, 1, 2, 6, 2, 1, 7, 5, 4, 3, 3, 3, 4, 6, 8, 1, 2, 3, 6, 1, 2, 5, 1, 2, 6, 1, 4, 1, 3, 8, 2, 8, 2, 8, 2, 1, 3, 1, 5, 2, 8, 3, 1, 6, 2, 1, 5, 2, 1, 6, 3, 1, 8, 4, 2, 1, 7, 4, 2, 1, 8, 5, 3, 1, 1, 8, 5, 3, 2, 1, 1, 8, 6, 4, 3, 2, 1, 1, 1, 8, 7, 5, 4, 3, 3, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 9, 9, 9, 9, 9, 9, 9, 9, 1
Offset: 0

Views

Author

Keywords

Comments

Kunoff proved that the distribution of terms of this sequence follows Benford's law, i.e., the asymptotic density of terms with value d (between 1 and 9) is log_10(1+1/d). - Amiram Eldar, Sep 23 2019

Crossrefs

Cf. A000966, A000142, A018799, A202021 (leading digit of (10^n)!), A213201.

Programs

  • Haskell
    a008905 = a000030 . a000142  -- Reinhard Zumkeller, Apr 08 2012
  • Mathematica
    f[n_] := Quotient[n!, 10^Floor@ Log[10, n!]]; Array[f, 105, 0]

Formula

a(n) = A000030(A000142(n)). - Reinhard Zumkeller, Apr 08 2012

Extensions

Two less-efficient Mathematica codings removed by Robert G. Wilson v, Nov 05 2010