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!)
A367799 Ordinal transform of the final nonzero digit of the factorial numbers. 2
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, 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, 15, 10, 11, 12, 18, 13, 16, 14, 15, 19, 16, 17, 17, 18, 17, 19, 20 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,2
COMMENTS
n is the a(n)-th nonnegative integer producing value A008904(n).
LINKS
FORMULA
Ordinal transform of A008904.
a(n) = |{ j in {0..n} : A008904(j) = A008904(n) }|.
EXAMPLE
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, ... .
PROG
(Python)
from functools import reduce
from itertools import count, islice
from collections import Counter
from sympy.ntheory.factor_ import digits
def A367799_gen(): # generator of terms
c = Counter()
for n in count(0):
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
yield c[m]
A367799_list = list(islice(A367799_gen(), 50)) # Chai Wah Wu, Dec 08 2023
CROSSREFS
Sequence in context: A316854 A367759 A125769 * A272084 A003023 A156070
KEYWORD
nonn,base
AUTHOR
Alois P. Heinz, Dec 07 2023
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 July 3 05:06 EDT 2024. Contains 373966 sequences. (Running on oeis4.)