17

Without using computer programs, can we find the last non-zero digit of $(\dots((2018\underset{! \text{ occurs }1009\text{ times}}{\underbrace{!)!)!\dots)!}}$?

What I know is that the last non-zero digit of $2018!$ is $4$, but I do not know what to do with that $4$.

Is it useful that $!$ occurs $1009$ times where $1009$ is half of $2018$? If that is useful, then what if $1009$ was another value, say $1234$?

Any help will be appreciated. THANKS!

Bill Dubuque
  • 272,048
Hussain-Alqatari
  • 5,065
  • 2
  • 13
  • 39
  • 1
    have you tried smaller repeats ? –  Aug 26 '19 at 14:45
  • @Roddy MacPhee Even doing two factorials is an obscenely large number, a quick wolframalpha search shows $(2018!)! > 10^{10^{5000}}$ – Gabe Aug 26 '19 at 15:00
  • 1
    smaller inputs @Gabe . With start value 3 I can get $((3!)!)!$ but the next gives me a truncation error in PARI/GP. –  Aug 26 '19 at 15:06
  • 5
    Probably useful: https://math.stackexchange.com/questions/130352/last-non-zero-digit-of-a-factorial – Cheerful Parsnip Aug 26 '19 at 15:18
  • or that $10^n!$ has the same last non-zero digit of $(9!)^{10^n-1\over 9}$ –  Aug 26 '19 at 15:38
  • 2
    @Hussain-Alqatari would you tell me about the source of the problem? – Vulch Mar 24 '24 at 08:12
  • @Vulch I'm simply asking, please don't take it as offensive: why does the source matter? – Sbsty Mar 29 '24 at 13:46
  • @Sbsty It can indicate how hard the problem is or which methods are needed to solve it. For example, it could appear in a computer science / algorithms textbook, or a number theory textbook, or an "open problems" section in a mathematical journal, or maybe OP's friend asked the problem and does not know how hard it is. – Bart Michels Mar 30 '24 at 14:47

0 Answers0