Find the smallest integer n such that the expression $40! cdot 5^n$ has the maximum number of trailing zeros.












0












$begingroup$


Find the smallest integer n such that the expression $$40! cdot 5^n$$ has the maximum number of
trailing zeros.










share|cite|improve this question











$endgroup$








  • 1




    $begingroup$
    $text {Ans}=lfloor frac {40}{2} +frac {40}{4} +frac {40}{8} +frac {40}{16} +frac {40}{32} rfloor-lfloor frac {40}{5} +frac {40}{25} rfloor$
    $endgroup$
    – Mohammad Zuhair Khan
    Dec 14 '18 at 16:17






  • 1




    $begingroup$
    @MohammadZuhairKhan Shouldn't the floor function arguments be kept separate before addition? It doesn't make a difference in this case, but it might in general.
    $endgroup$
    – Deepak
    Dec 14 '18 at 16:52


















0












$begingroup$


Find the smallest integer n such that the expression $$40! cdot 5^n$$ has the maximum number of
trailing zeros.










share|cite|improve this question











$endgroup$








  • 1




    $begingroup$
    $text {Ans}=lfloor frac {40}{2} +frac {40}{4} +frac {40}{8} +frac {40}{16} +frac {40}{32} rfloor-lfloor frac {40}{5} +frac {40}{25} rfloor$
    $endgroup$
    – Mohammad Zuhair Khan
    Dec 14 '18 at 16:17






  • 1




    $begingroup$
    @MohammadZuhairKhan Shouldn't the floor function arguments be kept separate before addition? It doesn't make a difference in this case, but it might in general.
    $endgroup$
    – Deepak
    Dec 14 '18 at 16:52
















0












0








0


2



$begingroup$


Find the smallest integer n such that the expression $$40! cdot 5^n$$ has the maximum number of
trailing zeros.










share|cite|improve this question











$endgroup$




Find the smallest integer n such that the expression $$40! cdot 5^n$$ has the maximum number of
trailing zeros.







number-theory elementary-number-theory






share|cite|improve this question















share|cite|improve this question













share|cite|improve this question




share|cite|improve this question








edited Dec 14 '18 at 16:09









Peter

46.9k1039125




46.9k1039125










asked Dec 14 '18 at 16:07









Isaiah LeobreraIsaiah Leobrera

301




301








  • 1




    $begingroup$
    $text {Ans}=lfloor frac {40}{2} +frac {40}{4} +frac {40}{8} +frac {40}{16} +frac {40}{32} rfloor-lfloor frac {40}{5} +frac {40}{25} rfloor$
    $endgroup$
    – Mohammad Zuhair Khan
    Dec 14 '18 at 16:17






  • 1




    $begingroup$
    @MohammadZuhairKhan Shouldn't the floor function arguments be kept separate before addition? It doesn't make a difference in this case, but it might in general.
    $endgroup$
    – Deepak
    Dec 14 '18 at 16:52
















  • 1




    $begingroup$
    $text {Ans}=lfloor frac {40}{2} +frac {40}{4} +frac {40}{8} +frac {40}{16} +frac {40}{32} rfloor-lfloor frac {40}{5} +frac {40}{25} rfloor$
    $endgroup$
    – Mohammad Zuhair Khan
    Dec 14 '18 at 16:17






  • 1




    $begingroup$
    @MohammadZuhairKhan Shouldn't the floor function arguments be kept separate before addition? It doesn't make a difference in this case, but it might in general.
    $endgroup$
    – Deepak
    Dec 14 '18 at 16:52










1




1




$begingroup$
$text {Ans}=lfloor frac {40}{2} +frac {40}{4} +frac {40}{8} +frac {40}{16} +frac {40}{32} rfloor-lfloor frac {40}{5} +frac {40}{25} rfloor$
$endgroup$
– Mohammad Zuhair Khan
Dec 14 '18 at 16:17




$begingroup$
$text {Ans}=lfloor frac {40}{2} +frac {40}{4} +frac {40}{8} +frac {40}{16} +frac {40}{32} rfloor-lfloor frac {40}{5} +frac {40}{25} rfloor$
$endgroup$
– Mohammad Zuhair Khan
Dec 14 '18 at 16:17




1




1




$begingroup$
@MohammadZuhairKhan Shouldn't the floor function arguments be kept separate before addition? It doesn't make a difference in this case, but it might in general.
$endgroup$
– Deepak
Dec 14 '18 at 16:52






$begingroup$
@MohammadZuhairKhan Shouldn't the floor function arguments be kept separate before addition? It doesn't make a difference in this case, but it might in general.
$endgroup$
– Deepak
Dec 14 '18 at 16:52












2 Answers
2






active

oldest

votes


















2












$begingroup$

Hint: Legendre's theorem
can be used to find the largest powers of $2$ and of $5$ that divide $40!$.






share|cite|improve this answer









$endgroup$





















    1












    $begingroup$

    Basically, you need to count the number of factors $2$ and $5$ in the factorial $40!$:
    $$begin{align}40!&=color{red}1cdot 2cdot color{red}3cdot 4cdot color{red}5cdots 38cdot color{red}{39}cdot 40=\
    &=2^{20}cdot (color{blue}1cdot 2cdot color{blue}3cdots color{blue}{19}cdot 20)cdot (color{red}1cdot color{red}3cdot color{red}5cdots color{red}{37}cdot color{red}{39})=\
    &=2^{20}cdot 2^{10}cdot (1cdot 2cdot 3cdots 9cdot 10)cdot (color{blue}1cdot color{blue}3cdots color{blue}{19})cdot (1cdot 3cdot 5cdots 37cdot 39)=\
    &=2^{20}cdot 2^{10}cdot 2^5cdot (1cdot 2cdot 3cdot 4cdot 5)cdot (1cdot 3cdots 9)cdot (1cdot 3cdots 19)cdot (1cdot 3cdot 5cdots 37cdot 39)=\
    &=2^{20}cdot 2^{10}cdot 2^5cdot 2^3cdot (1cdot 3cdot 5)cdot (1cdots 9)cdot (1cdots 19)cdot (1cdots 39)=\
    &=2^{38}cdot (5A)cdot (5B)cdot (5^2C)cdot (5^5D)=\
    &=2^{38}cdot 5^9E. end{align}$$

    Hence, the minimum $n$ in $40!cdot 5^n$ is: $38=9+nRightarrow n=29$.






    share|cite|improve this answer









    $endgroup$













      Your Answer





      StackExchange.ifUsing("editor", function () {
      return StackExchange.using("mathjaxEditing", function () {
      StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix) {
      StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
      });
      });
      }, "mathjax-editing");

      StackExchange.ready(function() {
      var channelOptions = {
      tags: "".split(" "),
      id: "69"
      };
      initTagRenderer("".split(" "), "".split(" "), channelOptions);

      StackExchange.using("externalEditor", function() {
      // Have to fire editor after snippets, if snippets enabled
      if (StackExchange.settings.snippets.snippetsEnabled) {
      StackExchange.using("snippets", function() {
      createEditor();
      });
      }
      else {
      createEditor();
      }
      });

      function createEditor() {
      StackExchange.prepareEditor({
      heartbeatType: 'answer',
      autoActivateHeartbeat: false,
      convertImagesToLinks: true,
      noModals: true,
      showLowRepImageUploadWarning: true,
      reputationToPostImages: 10,
      bindNavPrevention: true,
      postfix: "",
      imageUploader: {
      brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
      contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
      allowUrls: true
      },
      noCode: true, onDemand: true,
      discardSelector: ".discard-answer"
      ,immediatelyShowMarkdownHelp:true
      });


      }
      });














      draft saved

      draft discarded


















      StackExchange.ready(
      function () {
      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3039551%2ffind-the-smallest-integer-n-such-that-the-expression-40-cdot-5n-has-the-max%23new-answer', 'question_page');
      }
      );

      Post as a guest















      Required, but never shown

























      2 Answers
      2






      active

      oldest

      votes








      2 Answers
      2






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes









      2












      $begingroup$

      Hint: Legendre's theorem
      can be used to find the largest powers of $2$ and of $5$ that divide $40!$.






      share|cite|improve this answer









      $endgroup$


















        2












        $begingroup$

        Hint: Legendre's theorem
        can be used to find the largest powers of $2$ and of $5$ that divide $40!$.






        share|cite|improve this answer









        $endgroup$
















          2












          2








          2





          $begingroup$

          Hint: Legendre's theorem
          can be used to find the largest powers of $2$ and of $5$ that divide $40!$.






          share|cite|improve this answer









          $endgroup$



          Hint: Legendre's theorem
          can be used to find the largest powers of $2$ and of $5$ that divide $40!$.







          share|cite|improve this answer












          share|cite|improve this answer



          share|cite|improve this answer










          answered Dec 14 '18 at 16:14









          Robert IsraelRobert Israel

          319k23209460




          319k23209460























              1












              $begingroup$

              Basically, you need to count the number of factors $2$ and $5$ in the factorial $40!$:
              $$begin{align}40!&=color{red}1cdot 2cdot color{red}3cdot 4cdot color{red}5cdots 38cdot color{red}{39}cdot 40=\
              &=2^{20}cdot (color{blue}1cdot 2cdot color{blue}3cdots color{blue}{19}cdot 20)cdot (color{red}1cdot color{red}3cdot color{red}5cdots color{red}{37}cdot color{red}{39})=\
              &=2^{20}cdot 2^{10}cdot (1cdot 2cdot 3cdots 9cdot 10)cdot (color{blue}1cdot color{blue}3cdots color{blue}{19})cdot (1cdot 3cdot 5cdots 37cdot 39)=\
              &=2^{20}cdot 2^{10}cdot 2^5cdot (1cdot 2cdot 3cdot 4cdot 5)cdot (1cdot 3cdots 9)cdot (1cdot 3cdots 19)cdot (1cdot 3cdot 5cdots 37cdot 39)=\
              &=2^{20}cdot 2^{10}cdot 2^5cdot 2^3cdot (1cdot 3cdot 5)cdot (1cdots 9)cdot (1cdots 19)cdot (1cdots 39)=\
              &=2^{38}cdot (5A)cdot (5B)cdot (5^2C)cdot (5^5D)=\
              &=2^{38}cdot 5^9E. end{align}$$

              Hence, the minimum $n$ in $40!cdot 5^n$ is: $38=9+nRightarrow n=29$.






              share|cite|improve this answer









              $endgroup$


















                1












                $begingroup$

                Basically, you need to count the number of factors $2$ and $5$ in the factorial $40!$:
                $$begin{align}40!&=color{red}1cdot 2cdot color{red}3cdot 4cdot color{red}5cdots 38cdot color{red}{39}cdot 40=\
                &=2^{20}cdot (color{blue}1cdot 2cdot color{blue}3cdots color{blue}{19}cdot 20)cdot (color{red}1cdot color{red}3cdot color{red}5cdots color{red}{37}cdot color{red}{39})=\
                &=2^{20}cdot 2^{10}cdot (1cdot 2cdot 3cdots 9cdot 10)cdot (color{blue}1cdot color{blue}3cdots color{blue}{19})cdot (1cdot 3cdot 5cdots 37cdot 39)=\
                &=2^{20}cdot 2^{10}cdot 2^5cdot (1cdot 2cdot 3cdot 4cdot 5)cdot (1cdot 3cdots 9)cdot (1cdot 3cdots 19)cdot (1cdot 3cdot 5cdots 37cdot 39)=\
                &=2^{20}cdot 2^{10}cdot 2^5cdot 2^3cdot (1cdot 3cdot 5)cdot (1cdots 9)cdot (1cdots 19)cdot (1cdots 39)=\
                &=2^{38}cdot (5A)cdot (5B)cdot (5^2C)cdot (5^5D)=\
                &=2^{38}cdot 5^9E. end{align}$$

                Hence, the minimum $n$ in $40!cdot 5^n$ is: $38=9+nRightarrow n=29$.






                share|cite|improve this answer









                $endgroup$
















                  1












                  1








                  1





                  $begingroup$

                  Basically, you need to count the number of factors $2$ and $5$ in the factorial $40!$:
                  $$begin{align}40!&=color{red}1cdot 2cdot color{red}3cdot 4cdot color{red}5cdots 38cdot color{red}{39}cdot 40=\
                  &=2^{20}cdot (color{blue}1cdot 2cdot color{blue}3cdots color{blue}{19}cdot 20)cdot (color{red}1cdot color{red}3cdot color{red}5cdots color{red}{37}cdot color{red}{39})=\
                  &=2^{20}cdot 2^{10}cdot (1cdot 2cdot 3cdots 9cdot 10)cdot (color{blue}1cdot color{blue}3cdots color{blue}{19})cdot (1cdot 3cdot 5cdots 37cdot 39)=\
                  &=2^{20}cdot 2^{10}cdot 2^5cdot (1cdot 2cdot 3cdot 4cdot 5)cdot (1cdot 3cdots 9)cdot (1cdot 3cdots 19)cdot (1cdot 3cdot 5cdots 37cdot 39)=\
                  &=2^{20}cdot 2^{10}cdot 2^5cdot 2^3cdot (1cdot 3cdot 5)cdot (1cdots 9)cdot (1cdots 19)cdot (1cdots 39)=\
                  &=2^{38}cdot (5A)cdot (5B)cdot (5^2C)cdot (5^5D)=\
                  &=2^{38}cdot 5^9E. end{align}$$

                  Hence, the minimum $n$ in $40!cdot 5^n$ is: $38=9+nRightarrow n=29$.






                  share|cite|improve this answer









                  $endgroup$



                  Basically, you need to count the number of factors $2$ and $5$ in the factorial $40!$:
                  $$begin{align}40!&=color{red}1cdot 2cdot color{red}3cdot 4cdot color{red}5cdots 38cdot color{red}{39}cdot 40=\
                  &=2^{20}cdot (color{blue}1cdot 2cdot color{blue}3cdots color{blue}{19}cdot 20)cdot (color{red}1cdot color{red}3cdot color{red}5cdots color{red}{37}cdot color{red}{39})=\
                  &=2^{20}cdot 2^{10}cdot (1cdot 2cdot 3cdots 9cdot 10)cdot (color{blue}1cdot color{blue}3cdots color{blue}{19})cdot (1cdot 3cdot 5cdots 37cdot 39)=\
                  &=2^{20}cdot 2^{10}cdot 2^5cdot (1cdot 2cdot 3cdot 4cdot 5)cdot (1cdot 3cdots 9)cdot (1cdot 3cdots 19)cdot (1cdot 3cdot 5cdots 37cdot 39)=\
                  &=2^{20}cdot 2^{10}cdot 2^5cdot 2^3cdot (1cdot 3cdot 5)cdot (1cdots 9)cdot (1cdots 19)cdot (1cdots 39)=\
                  &=2^{38}cdot (5A)cdot (5B)cdot (5^2C)cdot (5^5D)=\
                  &=2^{38}cdot 5^9E. end{align}$$

                  Hence, the minimum $n$ in $40!cdot 5^n$ is: $38=9+nRightarrow n=29$.







                  share|cite|improve this answer












                  share|cite|improve this answer



                  share|cite|improve this answer










                  answered Dec 14 '18 at 17:01









                  farruhotafarruhota

                  19.6k2738




                  19.6k2738






























                      draft saved

                      draft discarded




















































                      Thanks for contributing an answer to Mathematics Stack Exchange!


                      • Please be sure to answer the question. Provide details and share your research!

                      But avoid



                      • Asking for help, clarification, or responding to other answers.

                      • Making statements based on opinion; back them up with references or personal experience.


                      Use MathJax to format equations. MathJax reference.


                      To learn more, see our tips on writing great answers.




                      draft saved


                      draft discarded














                      StackExchange.ready(
                      function () {
                      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3039551%2ffind-the-smallest-integer-n-such-that-the-expression-40-cdot-5n-has-the-max%23new-answer', 'question_page');
                      }
                      );

                      Post as a guest















                      Required, but never shown





















































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown

































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown







                      Popular posts from this blog

                      Bressuire

                      Cabo Verde

                      Gyllenstierna