Can $n!$ start with the digits 2020...

217 Views Asked by At

Can anyone give me any hints on how to tackle this? I assume the answer is no otherwise why ask the question. I am aware that $k \mid n!$ for all $k\leq n$, and I am aware that divisibility by $3$, $9$ and $11$ in particular have nice and easy tests involving sums of digits etc. I know that $2020 = 2^2 \cdot 5 \cdot 101$ written as a product of primes. However I am not seeing how these things help..

Thanks

Edit: Plot twist... $384!$ begins with the digits $2020$ so now the question is how do we prove this can happen (let's pretend we don't have computers)?

3

There are 3 best solutions below

0
On
384,8297,8795

Brute force

Select[Table[{FromDigits[Take[IntegerDigits[n!], 4]], n}, {n, 10, 10000}], #[[1]] == 2020 &]
1
On

The main idea to prove that this works for any starting sequence of numbers is that if you have a number $n$ that starts with a $1$, then many $0$'s, then a $1$ then many more zeros, the factorials of $n$, $n+1$,a.s.o will not change fast in the first however many digits you are interested (as you are effectily multipliying with $1.00\ldots00100\ldots xyz$. If you can prove that over many such factorials they do change to "wrap around" and come back to the initial value, you know they must at some time have been of the value that you are interested in.

Formally, set $n=10^{3k}+10^{2k}$ and look at

$$n!, (n+1)!, \ldots, (n+10^{2k})!,$$

then you notice that each factorial will be generated from the one before by multiplication with a number between $10^{3k}$ and $10^{3k}+2\cdot10^{2k}$ and that this will increase the number formed by the first $k-1$ digits of the factorial by at most $1$ (both multiplications by $10^{3k}$ and $10^{2k}$ are just shifts by many zeros, multiplication with $2$ may move the leading digit one to the left, and the adding means there might be a potential carry from the $k$-the digit from the start to the $k-1$-th digit.

That means if you look at the first $k-1$ digits of those factorials, they will change by at most $1$ from one factorial to the next.

OTOH, since

$$(1+\frac1{10^k})^{10^{2k}} \ge 1 + 10^{2k}\frac1{10^k}=1+10^k > 10$$

we have that the "renormalized" factorials

$$n!, \frac{(n+1)!}{10^{3k}}, \ldots, \frac{(n+i)!}{10^{3ki}},\ldots,\frac{(n+10^{2k})!}{10^{3k10^{2k}}}$$

where the quotient of one to the one before is

$$\frac{\frac{(n+i)!}{10^{3ki}}}{\frac{(n+i-1)!}{10^{3k(i-1)}}} = \frac{n+i}{10^{3k}} \ge \frac{n}{10^{3k}} = 1+\frac1{10^k}$$

actually increase such that from the first $n!$ to the last $\frac{(n+10^{2k})!}{10^{3k10^{2k}}}$ it covers a factor of at least $10$. That means the initial $k-1$ digits from $n!$ have come around again, so the proof is done.

0
On

Let᾽s start with some definition.

Definition. Let $x\in(0,\infty)$. The decimal part of the decadic logarithm of $x$ is called mantissa of $x$ and we denote it as $$\text{m}(x)=\log_{10}x-\lfloor\log_{10}x\rfloor.$$

Observe first that $n!$ starts with 2020 if and only if $$ \text{m}(n!)=\log_{10}(n!)-\lfloor\log_{10}(n!)\rfloor\in [\log_{10}2.020,\log_{10}2.021). $$

Hence, suffices to show that the values of the sequence $$a_n=\text{m}(n!)=\log_{10}(n!)-\lfloor\log_{10}(n!)\rfloor,\,\,n\in\mathbb N,$$ are dense in $[0,1]$.

In particular, we shall prove that for any $c,d$, with $(c,d)\subset [0,1]$, there exist an $n\in\mathbb N$, such that $a_n\in (c,d)$.

This will be achieved in the following way. Will shall try to find $k,\ell\in\mathbb N$, such that the mantissas of $$ N_j=10^k+j, \quad j=1,\ldots,\ell $$ are all less that $d-c$, i.e., $\text{m}(N_j)\in (0,d-c)$, and their sum exceeds 1, i.e., $\sum_{j=1}^\ell \text{m}(N_j)>1$.

Suppose that we have found such $k$ and $\ell$. If $\ell_0<\ell$, such that $\sum_{j=1}^{\ell_0} \text{m}(N_j)\le 1$, while $\sum_{j=1}^{\ell_0+1} \text{m}(N_j)> 1$, then the numbers $$ b_j=\sum_{i=1}^j\text{m}(N_i)=\text{m}(N_1N_2\cdots N_j), \quad j=1,\ldots,\ell_0, $$ are distributed in $[0,1)$ is a way that $$ 0<b_1<b_2<\ldots<b_{\ell_0}\le 1<b_{\ell_0+1} $$ and $b_j-b_{j-1}<d-c$. Hence, at least of the numbers $$ \text{m}(n!)\in(c,d), \quad \text{for at least one of the numbers}\,\,\,n=N_1,\ldots,N_{\ell_0}, $$

The existence of suitable $k,\ell$ is provided by the following estimate:

$$ \prod_{j=1}^{\lfloor 5\sqrt{10^k}\rfloor} \left(1+\frac{j}{10^k}\right)>\sum_{j=1}^{\lfloor 5\sqrt{10^k}\rfloor}\frac{j}{10^k}\ge \frac{1}{10^k}\cdot \frac{1}{2}(\lfloor 5\sqrt{10^k}\rfloor)^2>10. $$ Hence, $k$ nad $\ell$ should be picked so that $$ \log\left(1+\frac{5}{\sqrt{10^k}}\right)<d-c\quad\text{and}\quad \ell=\lfloor 5\sqrt{10^k}\rfloor. $$