login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A063944 Final nonzero digit of (n!)! (A000197). 2
1, 1, 2, 2, 6, 6, 6, 4, 6, 8, 2, 8, 8, 6, 4, 4, 6, 6, 8, 2, 6, 4, 4, 8, 2, 2, 6, 2, 2, 6, 4, 6, 2, 2, 8, 4, 6, 8, 2, 2, 2, 2, 8, 6, 6, 6, 2, 2, 6, 8, 4, 2, 2, 2, 8, 8, 4, 4, 2, 6, 8, 6, 4, 6, 6, 4, 8, 2, 2, 4, 4, 2, 8, 2, 8, 2, 4, 2, 8, 8, 6, 8, 2, 8, 4, 4, 6, 8, 8, 6, 2, 4, 6, 2, 6, 4, 2, 6, 4, 6, 2, 6, 4, 2, 8, 2, 4, 2 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,3
LINKS
PROG
(PARI) for(n=0, 22, m=n!!; while(Mod(m, 10) == 0, m=m/10); print(Mod(m, 10)))
(Python)
from functools import reduce
from math import prod, factorial
from sympy.ntheory.factor_ import digits
def A063944(n): return reduce(lambda x, y:x*y%10, ((1, 1, 2, 6, 4)[a]*((6, 2, 4, 8)[i*a&3] if i*a else 1) for i, a in enumerate(digits(factorial(n), 5)[-1:0:-1])))*6%10 if n>1 else 1 # Chai Wah Wu, Dec 07 2023
CROSSREFS
Sequence in context: A368745 A185421 A219976 * A086447 A324032 A196872
KEYWORD
nonn,base
AUTHOR
Jason Earls, Sep 01 2001
EXTENSIONS
More terms from David W. Wilson, Sep 05 2001, who remarks that "I'll tell you, computing (107!)! took up some disk space!"
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 24 06:24 EDT 2024. Contains 371918 sequences. (Running on oeis4.)