login
A136754
Leading digit of n! in base 3.
14
1, 1, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 1, 1, 2, 1, 2, 1, 1, 2, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 2, 1, 1, 2, 1, 1, 2, 2, 1, 1, 2, 2, 1, 1, 1, 1, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
OFFSET
0,3
LINKS
EXAMPLE
a(10) = 2 as 10! = 20211100210000_3 which has leading digit 2. - David A. Corneth, Jan 15 2021
MATHEMATICA
Table[First[IntegerDigits[n!, 3]], {n, 0, 87}] (* Stefano Spezia, Aug 25 2022 *)
PROG
(PARI) a(n, {b = 3}) = my(f = n!); f \ b^logint(f, b) \\ David A. Corneth, Jan 10 2021
KEYWORD
nonn,easy,base
AUTHOR
Carl R. White, Jan 21 2008
EXTENSIONS
Missing a(0)=1 inserted by David A. Corneth, Jan 10 2021
STATUS
approved