## Automaticity of the sequence of the last nonzero digits of $$n!$$ in a fixed base.(English. French summary)Zbl 1475.11039

Let $$b \ge 2$$ be an integer. A sequence $$(a_n)_{n \ge 0}$$ taking finitely many values is said to be $$b$$-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 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 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  that the sequence $$(\ell_{12}(n!))_n$$ is 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)$$.

### MSC:

 11B85 Automata sequences 11A63 Radix representation; digital problems 68Q45 Formal languages and automata 68R15 Combinatorics on words

### Keywords:

automatic sequence; factorial; the last nonzero digit
Full Text:

### References:

  Allouche, Jean-Paul; Shallit, Jeffrey, Automatic Sequences. Theory, Applications, Generalizations (2003), Cambridge University Press · Zbl 1086.11015  Byszewski, Jakub; Konieczny, Jakub, A density version of Cobham’s theorem (2017) · Zbl 1477.11049  Deshouillers, Jean-Marc, A footnote to The least non zero digit of $$n!$$ in base 12, Unif. Distrib. Theory, 7, 1, 71-73 (2012) · Zbl 1313.11024  Deshouillers, Jean-Marc, Yet another footnote to The least non zero digit of $$n!$$ in base 12, Unif. Distrib. Theory, 11, 2, 163-167 (2016) · Zbl 1454.11018  Deshouillers, Jean-Marc; Ruzsa, Imre, The least non zero digit of $$n!$$ in base 12, Publ. Math., 79, 3-4, 395-400 (2011) · Zbl 1249.11044  Legendre, Adrien-Marie, Théorie des nombres (1830), Firmin Didot frÃ¨res · Zbl 1395.11005  Stewart, Cameron L., On the representation of an integer in two different bases, J. Reine Angew. Math., 319, 63-72 (1980) · Zbl 0426.10008
This reference list is based on information provided by the publisher or from digital mathematics libraries. Its items are heuristically matched to zbMATH identifiers and may contain data conversion errors. It attempts to reflect the references listed in the original paper as accurately as possible without claiming the completeness or perfect precision of the matching.