Problem

Source: IMO ShortList 1991, Problem 15 (USS 2)

Tags: factorial, modular arithmetic, Periodic sequence, IMO Shortlist, decimal representation, Digits



Let $ a_n$ be the last nonzero digit in the decimal representation of the number $ n!.$ Does the sequence $ a_1, a_2, \ldots, a_n, \ldots$ become periodic after a finite number of terms?