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.

A176786 Last nonzero digit of A000043(n)!.

This page as a plain text file.
%I A176786 #40 Dec 07 2023 10:56:17
%S A176786 6,4,8,6,8,6,6,8,2,6,4,4,8,8,6,2,4,2,2,2,8,2,6,2,4,4,8,6,4,2,8,6,2,6,
%T A176786 2,8,2,6,2,8,4,6,2,8,8,8,2,8
%N A176786 Last nonzero digit of A000043(n)!.
%C A176786 The C program, from first link, is based on a new method, see second link. It was developed from a congruence found in the first reference "Concrete Mathematics". The function D() of this program implements the simple division algorithm found in "D. E. Knuth, The Art of Computer Programming, V.2." (second reference). Another approach can be to use Dresden's formula that can be found from the third link.  One can use the function LastDigit() of the mentioned program to find the last nonzero digit of N! for very large values of N. The factorial of the 47th (known) Mersenne prime has approximately 10^12,978,195 digits.
%C A176786 Many other algorithms for the general problem of finding the last nonzero digit of a factorial are given in A008904. [_D. S. McNeil_, Dec 10 2010]
%D A176786 Ronald L. Graham, Donald E. Knuth and Oren Patashnik, Concrete Math.; Addison-Wesley, section 4, exercises 40, and 54.
%D A176786 D. E. Knuth, The Art of Computer Programming, vol.2, section 4.3.1, exercise 16.
%H A176786 W. Bomfim, <a href="http://oeis.org/w/images/f/f6/Main2.txt">C program</a>
%H A176786 W. Bomfim, <a href="http://oeis.org/w/images/6/68/AlgLastDigitFatorialNew.txt">An algorithm to find the last nonzero digit of N!</a>
%H A176786 Gregory P. Dresden, <a href="http://www.jstor.org/stable/27643091">Three transcendental numbers from the last non-zero digits of n^n, F_n and n!</a>, Math. Mag., pp. 96-105, vol. 81, 2008. See Lemma 7.
%F A176786 a(n) = A008904(2^A000043(n)-1) = A008904(A000668(n)).
%e A176786 a(1) = 6 since the first Mersenne prime is 3, and 3! = 6.
%Y A176786 Cf. A000043, A000668, A008904, A034886.
%K A176786 nonn,more,base
%O A176786 1,1
%A A176786 _Washington Bomfim_, Dec 07 2010
%E A176786 Terms for n <= 40 confirmed by _D. S. McNeil_, Dec 08 2010
%E A176786 a(41)-a(47) from _Max Alekseyev_, Jan 31 2012, Mar 16 2015, Dec 01 2019
%E A176786 a(48) from _Chai Wah Wu_, Dec 07 2023