login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A136755
a(n) = leading digit of n! in base 4.
13
1, 1, 2, 1, 1, 1, 2, 1, 2, 1, 3, 2, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 3, 1, 2, 3, 1, 2, 3, 1, 3, 1, 3, 1, 3, 1, 1, 2, 1, 3, 2, 1, 3, 2, 1, 1, 3, 2, 1, 1, 1, 3, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 3, 3, 1, 1, 1, 2, 2, 3, 1, 1, 2, 2, 1, 1, 1, 2, 1, 1, 2, 3, 1, 1, 2, 1
OFFSET
0,3
MATHEMATICA
f[n_]:=First[IntegerDigits[n!, 4]]; lst={}; Do[AppendTo[lst, f[n]], {n, 0, 2*5!}]; lst (* Vladimir Joseph Stephan Orlovsky, Jun 14 2009 *)
PROG
(PARI) a(n) = digits(n!, 4)[1]; \\ Michel Marcus, Jan 27 2015
KEYWORD
base,easy,nonn
AUTHOR
Carl R. White, Jan 21 2008
STATUS
approved