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.

A367799 Ordinal transform of the final nonzero digit of the factorial numbers.

This page as a plain text file.
%I A367799 #80 Dec 11 2023 15:27:49
%S A367799 1,2,1,1,1,2,3,2,4,1,2,3,2,4,5,5,6,3,7,6,3,4,8,5,4,6,7,9,8,5,10,11,6,
%T A367799 12,7,8,9,9,10,13,11,12,10,13,14,7,8,14,9,11,15,16,12,17,15,13,14,16,
%U A367799 15,10,11,12,18,13,16,14,15,19,16,17,17,18,17,19,20
%N A367799 Ordinal transform of the final nonzero digit of the factorial numbers.
%C A367799 n is the a(n)-th nonnegative integer producing value A008904(n).
%H A367799 Alois P. Heinz, <a href="/A367799/b367799.txt">Table of n, a(n) for n = 0..20000</a>
%F A367799 Ordinal transform of A008904.
%F A367799 a(n) = |{ j in {0..n} : A008904(j) = A008904(n) }|.
%e A367799 a(11) = 3 because 11! = 39916800 is the third factorial with final nonzero digit 8 after 9! = 362880 and 10! = 3628800. A008904(k) = 8 for k = 9, 10, 11, ... .
%o A367799 (Python)
%o A367799 from functools import reduce
%o A367799 from itertools import count, islice
%o A367799 from collections import Counter
%o A367799 from sympy.ntheory.factor_ import digits
%o A367799 def A367799_gen(): # generator of terms
%o A367799     c = Counter()
%o A367799     for n in count(0):
%o A367799         c[m:=reduce(lambda x,y:x*y%10,(((6,2,4,8,6,2,4,8,2,4,8,6,6,2,4,8,4,8,6,2)[(a<<2)|(i*a&3)] if i*a else (1,1,2,6,4)[a]) for i, a in enumerate(digits(n,5)[-1:0:-1])),6) if n>1 else 1]+=1
%o A367799         yield c[m]
%o A367799 A367799_list = list(islice(A367799_gen(),50)) # _Chai Wah Wu_, Dec 08 2023
%Y A367799 Cf. A000142, A004154, A008904, A368010.
%K A367799 nonn,base
%O A367799 0,2
%A A367799 _Alois P. Heinz_, Dec 07 2023