Results 1 to 3 of 3

Thread: n!

  1. #1
    MHF Contributor
    Joined
    Mar 2010
    From
    Florida
    Posts
    3,093
    Thanks
    10

    n!

    If $\displaystyle n!$ has 58 trailing zeros, what is n?

    $\displaystyle \left \lfloor \frac{n}{5} \right \rfloor + \left \lfloor \frac{n}{25} \right \rfloor + \dots + \left \lfloor \frac{n}{5^i} \right \rfloor=58$ where $\displaystyle i=1,2,...,j$

    I don't know what to do next.
    Follow Math Help Forum on Facebook and Google+

  2. #2
    MHF Contributor undefined's Avatar
    Joined
    Mar 2010
    From
    Chicago
    Posts
    2,340
    Awards
    1
    Quote Originally Posted by dwsmith View Post
    If $\displaystyle n!$ has 58 trailing zeros, what is n?

    $\displaystyle \left \lfloor \frac{n}{5} \right \rfloor + \left \lfloor \frac{n}{25} \right \rfloor + \dots + \left \lfloor \frac{n}{5^i} \right \rfloor=58$ where $\displaystyle i=1,2,...,j$

    I don't know what to do next.
    Actually you can write $\displaystyle \displaystyle 58 = \left \lfloor \frac{n}{5} \right \rfloor + \left \lfloor \frac{n}{25} \right \rfloor + \dots = \sum_{i=1}^\infty \left \lfloor \frac{n}{5^i} \right \rfloor $ since the terms eventually all become 0.

    We can get an immediate upper bound: if n=59*5, then the first term will be greater than 58. Since 59*5 - 1 < 625, clearly we have just the first three terms:

    $\displaystyle \displaystyle 58 = \left \lfloor \frac{n}{5} \right \rfloor + \left \lfloor \frac{n}{25} \right \rfloor + \left \lfloor \frac{n}{125} \right \rfloor$

    This is easy to play around with; 58/5 is about 12, so as an estimate we can subtract about 10*5 from our upper bound to get 59*5-51 = 244. Plugging in results in 48 + 9 + 1 = 58, as desired. So $\displaystyle n \in \{240,...,244\}$.
    Follow Math Help Forum on Facebook and Google+

  3. #3
    Super Member
    Joined
    Jan 2009
    Posts
    715
    Or let

    $\displaystyle n = 125a + 25b + 5c + d $ as a representation in base 5 , since it does not exceed $\displaystyle 625 $

    Therefore , $\displaystyle [ \frac{n}{5} ] = 25a + 5b + c ~ [ \frac{n}{25} ] = 5a + b ~,~ [ \frac{n}{125} ] = a $

    $\displaystyle 25a + 5b + c + 5a + b + a = 31a + 6b + c = 58 $

    $\displaystyle a = 1 ~,~ b = 4 ~,~ c =3 $ and $\displaystyle d $ ranges from $\displaystyle 0 $ to $\displaystyle 4 $ .

    $\displaystyle 125(1) + 25(4) + 5(3) + 0 \leq n \leq 125(1) + 25(4) + 5(3) + 4 $

    $\displaystyle 240 \leq n \leq 244 $ .
    Follow Math Help Forum on Facebook and Google+


/mathhelpforum @mathhelpforum