A136693 Final nonzero digit of n! in base 6.
1, 1, 2, 1, 4, 2, 2, 2, 4, 4, 4, 2, 4, 4, 2, 2, 2, 4, 2, 2, 4, 2, 2, 4, 4, 4, 2, 4, 4, 2, 4, 4, 2, 2, 2, 4, 4, 4, 2, 4, 4, 2, 2, 2, 4, 2, 2, 4, 2, 2, 4, 4, 4, 2, 2, 2, 4, 2, 2, 4, 4, 4, 2, 2, 2, 4, 2, 2, 4, 4, 4, 2, 4, 4, 2, 4, 4, 2, 2, 2, 4, 4, 4, 2, 4, 4, 2, 2, 2, 4, 4, 4, 2, 4, 4, 2, 2, 2, 4, 2
Offset: 0
Examples
6! = 720 decimal = 3200 senary, so a(6) = 2.
Crossrefs
Programs
-
Mathematica
nzd6[n_]:=Module[{c=IntegerExponent[n!,6]},IntegerDigits[n!,6] [[-(c+1)]]]; Array[nzd6,100,0] (* Harvey P. Dale, Sep 02 2015 *)