A176786 Last nonzero digit of A000043(n)!.
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, 2, 8, 2, 6, 2, 8, 4, 6, 2, 8, 8, 8, 2, 8
Offset: 1
Examples
a(1) = 6 since the first Mersenne prime is 3, and 3! = 6.
References
- Ronald L. Graham, Donald E. Knuth and Oren Patashnik, Concrete Math.; Addison-Wesley, section 4, exercises 40, and 54.
- D. E. Knuth, The Art of Computer Programming, vol.2, section 4.3.1, exercise 16.
Links
- W. Bomfim, C program
- W. Bomfim, An algorithm to find the last nonzero digit of N!
- Gregory P. Dresden, Three transcendental numbers from the last non-zero digits of n^n, F_n and n!, Math. Mag., pp. 96-105, vol. 81, 2008. See Lemma 7.
Extensions
Terms for n <= 40 confirmed by D. S. McNeil, Dec 08 2010
a(41)-a(47) from Max Alekseyev, Jan 31 2012, Mar 16 2015, Dec 01 2019
a(48) from Chai Wah Wu, Dec 07 2023
Comments