cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A063944 Final nonzero digit of (n!)! (A000197).

This page as a plain text file.
%I A063944 #27 Dec 07 2023 11:40:22
%S A063944 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,
%T A063944 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,
%U A063944 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
%N A063944 Final nonzero digit of (n!)! (A000197).
%H A063944 David W. Wilson, <a href="/A063944/b063944.txt">Table of n, a(n) for n = 0..10000</a>
%H A063944 <a href="/index/Fi#final">Index entries for sequences related to final digits of numbers</a>
%o A063944 (PARI) for(n=0,22,m=n!!; while(Mod(m,10) == 0,m=m/10); print(Mod(m,10)))
%o A063944 (Python)
%o A063944 from functools import reduce
%o A063944 from math import prod, factorial
%o A063944 from sympy.ntheory.factor_ import digits
%o A063944 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
%Y A063944 Cf. A000197, A008904.
%K A063944 nonn,base
%O A063944 0,3
%A A063944 _Jason Earls_, Sep 01 2001
%E A063944 More terms from _David W. Wilson_, Sep 05 2001, who remarks that "I'll tell you, computing (107!)! took up some disk space!"