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.

A136766 a(n) = leading digit of n! in base 16.

Original entry on oeis.org

1, 1, 2, 6, 1, 7, 2, 1, 9, 5, 3, 2, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 3, 5, 8, 12, 1, 2, 3, 6, 13, 1, 3, 6, 13, 1, 4, 9, 1, 3, 8, 1, 3, 10, 1, 4, 14, 2, 7, 1, 4, 14, 2, 9, 2, 7, 1, 5, 1, 4, 1, 4, 1, 3, 15, 4, 1, 4, 1, 5, 1, 6, 1, 7, 2, 10, 3, 15, 4, 1, 7, 2, 11, 3, 1, 6, 2, 11, 4, 1, 7, 2, 1, 5, 2, 12, 4, 1, 11
Offset: 0

Views

Author

Carl R. White, Jan 21 2008

Keywords

Examples

			For n=5, 5! = 5*4*3*2*1 = 120 in base 10, which is 78 in hexadecimal (7*16 + 8*1), so a(5) = 7. - _Michael B. Porter_, Sep 20 2016
		

Crossrefs

Programs

  • Mathematica
    Array[ IntegerDigits[#!, 16][[1]] &, 1001, 0] (* Robert G. Wilson v, Sep 20 2016 *)
    Table[Floor[#/16^Floor@ Log[16, #]] &[n!], {n, 0, 98}] (* Michael De Vlieger, Sep 20 2016 *)
  • PARI
    a(n) = digits(n!, 16)[1]; \\ Michel Marcus, Jan 27 2015