login
A136691
Final nonzero digit of n! in base 4.
16
1, 1, 2, 2, 2, 2, 1, 3, 2, 2, 3, 1, 3, 3, 2, 2, 2, 2, 3, 1, 1, 1, 2, 2, 3, 3, 2, 2, 2, 2, 1, 3, 2, 2, 3, 1, 1, 1, 2, 2, 1, 1, 2, 2, 2, 2, 3, 1, 3, 3, 2, 2, 2, 2, 3, 1, 2, 2, 3, 1, 3, 3, 2, 2, 2, 2, 3, 1, 1, 1, 2, 2, 1, 1, 2, 2, 2, 2, 3, 1, 1, 1, 2, 2, 2, 2, 1, 3, 2, 2, 1, 3, 1, 1, 2, 2, 3, 3, 2, 2
OFFSET
0,3
LINKS
EXAMPLE
6! = 720 decimal = 23100 quartal, so a(6) = 1.
MATHEMATICA
nzd[n_]:=Module[{rd=RealDigits[n!, 4][[1]]}, If[Last[rd]!=0, Last[rd], Last[ Flatten[Most[Split[rd]]]]]]; Array[nzd, 100, 0] (* Harvey P. Dale, May 08 2014 *)
KEYWORD
base,easy,nonn
AUTHOR
Carl R. White, Jan 16 2008
STATUS
approved