Results 1 to 3 of 3

Math Help - n!

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

    n!

    If n! has 58 trailing zeros, what is n?

    \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 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 n! has 58 trailing zeros, what is n?

    \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 i=1,2,...,j

    I don't know what to do next.
    Actually you can write \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 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 n \in \{240,...,244\}.
    Follow Math Help Forum on Facebook and Google+

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

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

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

     25a  + 5b + c + 5a + b + a = 31a + 6b + c = 58

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

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

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


/mathhelpforum @mathhelpforum