Automaticity of the sequence of the last nonzero digits of n! in a fixed base

From MaRDI portal
Publication:2199500



Abstract: In 2011 Deshouillers and Ruzsa tried to argument that the sequence of the last nonzero digit of n! in base 12 is not automatic. This statement was proved few years later by Deshoulliers. In this paper we provide alternate proof that lets us generalize the problem and give an exact characterization in which bases the sequence of the last nonzero digits of n! is automatic.


Let \(b \ge 2\) be an integer. A sequence \((a_n)_{n \ge 0}\) taking finitely many values is said to be \(b\)-\textit{automatic} if there is a finite machine which permits to know the value of \(a_n\) by reading one after the other the digits of \(n\) in its expansion in base \(b\). Moreover, the sequence \((a_n)_n\) is said to be \textit{automatic} if it is \(k\)-automatic for some \(k\). This classical notion is recalled in Section 2 as well as its main properties -- a useful point. The author addresses the question of the automaticity of the sequence \((\ell_b(n!))_n\), where \(\ell_b(n!)\) - an integer in \([1, b-1]\) - denotes the \textit{last nonzero digit} of \(n!\) in base \(b\), defined in the following way: if one writes \(n! = b^r m\), where \(\gcd(m, b) \neq 0\), then \(\ell_b(n!) \) is congruent to \(\gcd(m,b)\) modulo \(b\). It is folklore that \((\ell_b(n!))_n\) is automatic if \(b\) is a power of a prime, or a small number like \(6\) or \(10\). It was proved in the paper quoted as [4] that the sequence \((\ell_{12}(n!))_n\) is \textit{not} automatic. The paper completely characterizes the values of \(b\) for which the sequence \((\ell_b(n!))_n\) is automatic. More precisely, Theorem 3, proved in Section 3, states the following Let \(b = p_1^{a_1} p_2^{a_2}\cdots\) with \(a_1(p_1-1) \ge a_2(p_2-1)\ge \cdots\). The sequence \((\ell_b(n!))_n\) is \(p_1\)-automatic if \(a_1(p_1-1) > a_2(p_2-1)\) or \(b = p_1^{{a_1}}\) and is not automatic otherwise. Notice that \(12=2^2 \times 3^1\) with \(2\times (2-1) = 1 \times (3-1)\).











This page was built for publication: Automaticity of the sequence of the last nonzero digits of \(n!\) in a fixed base

Report a bug (only for logged in users!)Click here to report a bug for this page (MaRDI item Q2199500)