# Does every finite digit-sequence appear in some factorial?

Suppose, some finite digit-sequence is given. Can we prove or disprove, that there is always some number $n$, such that the digit-sequence appears in the decimal-expansion of the number $n!$ ?

If there is no specific pattern in the decimal-expansions of the factorials, this should be the case, but I have no idea how we can check it.

• Here is a reformulation which may or may not help. It would be the same as to say that if there exists a number $n$ such that $n!$ after division by $10^k$ for some $k$ will be $= p (\textrm{mod} 10^l)$ where $p$ is any given number (of length $l$). – mathreadler Dec 1 '15 at 19:25

Pick a base $B\ge 2$ and $m\gg 0$ such that $$\tag0B^{m-1}>16.$$ Let $n=\lfloor\log_B(B^m!)\rfloor$ and for $k=0,1,2,\ldots$ let $$\tag1a_k=\frac{(B^m+k)!}{B^{km+n}}.$$ Then $1\le a_0<B$ and $$\tag2\frac{a_k}{a_{k-1}}=1+\frac{k}{B^m}$$ From $(2)$ and $a_{k-1}\ge\ldots\ge a_0\ge 1$ we have $$a_k- a_{k-1}=a_{k-1}\frac{k}{B^m}\ge \frac{k}{B^m},$$ hence $$a_k\ge 1+B^{-m}\sum_{j=1}^kj=1+\frac{k(k+1)}{2B^m}$$ and specifically (using $(0)$) $$\tag3a_{\frac12B^m}>\frac18B^m >2B$$ Also from $(2)$ we have $$\tag4\lfloor a_{k-1}\rfloor \le \lfloor a_k\rfloor\le \lfloor a_{k-1}\rfloor +1\qquad\text{if }a_{k-1}\le 2B\text{ and }k\le \frac12B^{m-1}.$$ Indeed, this follows from $a_k-a_{k-1}=\frac k{B^m}a_{k-1}\le 1$ under the given bounds for $a_{k-1}$ and $k$.
From $(3)$ and $(4)$ we conclude that $\lfloor a_0\rfloor,\ldots,\lfloor a_{\frac12B^{m-1}}\rfloor$ covers at least the integers $B,\ldots, 2B-1$. Specifically, all possible base-$B$ digits occur as unit digts in some $a_k$, hence as some base-$B$ digit in a factorial.
If we let $B=10^l$, this means that any length-$l$ decimal digit sequence occurs in some factorial.