login
A136760
a(n) = leading digit of n! in base 9.
14
1, 1, 2, 6, 2, 1, 8, 6, 6, 6, 6, 8, 1, 1, 2, 4, 8, 1, 3, 7, 1, 4, 1, 2, 7, 2, 6, 2, 7, 2, 8, 3, 1, 4, 1, 7, 3, 1, 6, 3, 1, 7, 3, 1, 1, 5, 3, 1, 1, 5, 3, 2, 1, 8, 5, 3, 2, 1, 1, 8, 6, 4, 3, 2, 2, 1, 1, 1, 1, 7, 6, 6, 5, 4, 4, 4, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 5, 5, 6, 7, 8, 1, 1, 1, 1, 2, 2
OFFSET
0,3
LINKS
EXAMPLE
a(10) = 6 as 10! = 6740700_9 which has leading digit 6. - David A. Corneth, Jan 15 2021
MATHEMATICA
f[n_]:=First[IntegerDigits[n!, 9]]; lst={}; Do[AppendTo[lst, f[n]], {n, 0, 2*5!}]; lst (* Vladimir Joseph Stephan Orlovsky, Jun 14 2009 *)
IntegerDigits[#, 9][[1]]&/@(Range[0, 100]!) (* Harvey P. Dale, Jun 21 2021 *)
PROG
(PARI) a(n) = digits(n!, 9)[1]; \\ Michel Marcus, Jan 27 2015
KEYWORD
base,easy,nonn
AUTHOR
Carl R. White, Jan 21 2008
STATUS
approved