Last six digits of $\left\lfloor\frac{302000002!}{e}\right\rfloor$.

62 Views Asked by At

Find the ending 6 digits of $\left\lfloor\frac{302000002!}{e}\right\rfloor$

Things I’ve noticed: The ending six digits of $302000002$ is just $2$. It’s essentially $!302000002$ is one off from $\left\lfloor\frac{302000002!}{e}\right\rfloor$.

The number $302000002$ seems arbitrary, so I think I’m missing something crucial. Thanks!

1

There are 1 best solutions below

1
On BEST ANSWER

Note that, for even $n$, $$\left\lfloor\frac{n!}{e}\right\rfloor=!n-1,$$ so it suffices to find the last six digits of $!n-1$ (as you noted). The second crucial step is that $$!n=n!\sum_{k=0}^n \frac{(-1)^k}{k!}=\sum_{k=0}^n (-1)^k\frac{n!}{k!}.$$ The number $n=302000002$ becomes important because, for $k\leq 302000002-3,$ $$10^6\ \big|\ n-2\ \big|\ \frac{n!}{(n-3)!}\ \big|\ \frac{n!}{k!}.$$ So many of the terms have $10^6$ as a divisor. Can you finish the rest?