smallest n digit number which is multiple of 7Finding the smallest baseA big “smallest” numberWhat's the smallest number with first digit 1 that triples when this digit is moved to the end?Find the smallest natural number $n$Determine the smallest prime which does not divide any five digit number…Smallest multiple containing only 1's and 0'sSmallest number starting with N divisble by every non zero digit of NBy which convention 04 (for example) is no valid 2 digit number?What is the smallest number $n>2$ of this kind?What's the smallest three digit number that satisfies the following system of congruences?

What does this wavy downward arrow preceding a piano chord mean?

Causes of bimodal distributions when bootstrapping a meta-analysis model

Decoupling cap routing on a 4 layer PCB

Can there be a single technologically advanced nation, in a continent full of non-technologically advanced nations?

60s/70s science fiction novel where a man (after years of trying) finally succeeds to make a coin levitate by sheer concentration

How can I get people to remember my character's gender?

Adding command shortcuts to bin

How to adjust tikz picture so it fits to current size of a table cell?

Why does this derived table improve performance?

How do inspiraling black holes get closer?

Has a commercial or military jet bi-plane ever been manufactured?

Introducing Gladys, an intrepid globetrotter

Are pressure-treated posts that have been submerged for a few days ruined?

Did we get closer to another plane than we were supposed to, or was the pilot just protecting our delicate sensibilities?

Would glacier 'trees' be plausible?

How I can I roll a number of non-digital dice to get a random number between 1 and 150?

Out of scope work duties and resignation

Why wasn't the Night King naked in S08E03?

Why aren't nationalizations in Russia described as socialist?

What is a smasher?

Pressure inside an infinite ocean?

How long would it take for people to notice a mass disappearance?

Does it make sense for a function to return a rvalue reference

In Stroustrup's example, what does this colon mean in `return 1 : 2`? It's not a label or ternary operator



smallest n digit number which is multiple of 7


Finding the smallest baseA big “smallest” numberWhat's the smallest number with first digit 1 that triples when this digit is moved to the end?Find the smallest natural number $n$Determine the smallest prime which does not divide any five digit number…Smallest multiple containing only 1's and 0'sSmallest number starting with N divisble by every non zero digit of NBy which convention 04 (for example) is no valid 2 digit number?What is the smallest number $n>2$ of this kind?What's the smallest three digit number that satisfies the following system of congruences?













2












$begingroup$


I want to find the smallest n digit number which is a multiple of $7$. For example, when $n=1$ then $7$ is the answer, if $n=2$ then $14$ is the answer, if $n=3$ then $105$ is the answer. What will be the answer for $n$th term?










share|cite|improve this question











$endgroup$







  • 1




    $begingroup$
    Are you familiar with modular arithmetic?
    $endgroup$
    – Arthur
    Apr 29 at 15:13










  • $begingroup$
    yes i am familiar.
    $endgroup$
    – sr123
    Apr 29 at 15:14










  • $begingroup$
    $!bmod 7!:, 10^large n-1!+k,equiv, 0iff k,equiv,ldots $
    $endgroup$
    – Bill Dubuque
    Apr 29 at 15:16
















2












$begingroup$


I want to find the smallest n digit number which is a multiple of $7$. For example, when $n=1$ then $7$ is the answer, if $n=2$ then $14$ is the answer, if $n=3$ then $105$ is the answer. What will be the answer for $n$th term?










share|cite|improve this question











$endgroup$







  • 1




    $begingroup$
    Are you familiar with modular arithmetic?
    $endgroup$
    – Arthur
    Apr 29 at 15:13










  • $begingroup$
    yes i am familiar.
    $endgroup$
    – sr123
    Apr 29 at 15:14










  • $begingroup$
    $!bmod 7!:, 10^large n-1!+k,equiv, 0iff k,equiv,ldots $
    $endgroup$
    – Bill Dubuque
    Apr 29 at 15:16














2












2








2


2



$begingroup$


I want to find the smallest n digit number which is a multiple of $7$. For example, when $n=1$ then $7$ is the answer, if $n=2$ then $14$ is the answer, if $n=3$ then $105$ is the answer. What will be the answer for $n$th term?










share|cite|improve this question











$endgroup$




I want to find the smallest n digit number which is a multiple of $7$. For example, when $n=1$ then $7$ is the answer, if $n=2$ then $14$ is the answer, if $n=3$ then $105$ is the answer. What will be the answer for $n$th term?







sequences-and-series elementary-number-theory






share|cite|improve this question















share|cite|improve this question













share|cite|improve this question




share|cite|improve this question








edited Apr 29 at 15:48









tarit goswami

2,5291522




2,5291522










asked Apr 29 at 15:10









sr123sr123

374




374







  • 1




    $begingroup$
    Are you familiar with modular arithmetic?
    $endgroup$
    – Arthur
    Apr 29 at 15:13










  • $begingroup$
    yes i am familiar.
    $endgroup$
    – sr123
    Apr 29 at 15:14










  • $begingroup$
    $!bmod 7!:, 10^large n-1!+k,equiv, 0iff k,equiv,ldots $
    $endgroup$
    – Bill Dubuque
    Apr 29 at 15:16













  • 1




    $begingroup$
    Are you familiar with modular arithmetic?
    $endgroup$
    – Arthur
    Apr 29 at 15:13










  • $begingroup$
    yes i am familiar.
    $endgroup$
    – sr123
    Apr 29 at 15:14










  • $begingroup$
    $!bmod 7!:, 10^large n-1!+k,equiv, 0iff k,equiv,ldots $
    $endgroup$
    – Bill Dubuque
    Apr 29 at 15:16








1




1




$begingroup$
Are you familiar with modular arithmetic?
$endgroup$
– Arthur
Apr 29 at 15:13




$begingroup$
Are you familiar with modular arithmetic?
$endgroup$
– Arthur
Apr 29 at 15:13












$begingroup$
yes i am familiar.
$endgroup$
– sr123
Apr 29 at 15:14




$begingroup$
yes i am familiar.
$endgroup$
– sr123
Apr 29 at 15:14












$begingroup$
$!bmod 7!:, 10^large n-1!+k,equiv, 0iff k,equiv,ldots $
$endgroup$
– Bill Dubuque
Apr 29 at 15:16





$begingroup$
$!bmod 7!:, 10^large n-1!+k,equiv, 0iff k,equiv,ldots $
$endgroup$
– Bill Dubuque
Apr 29 at 15:16











3 Answers
3






active

oldest

votes


















4












$begingroup$

The $n$ th term of the sequence will be $$10^n-1+big(7-(10^n-1pmod7)big)$$



Because to get a $n$ digit number you will need at least $10^n-1$, now suppose the number is of the form $10^n-1+k$ for some natural $k$, for divisibility we need $(10^n-1+k)equiv 0 pmod7$ and to satisfy the minimality condition we need $kin [0,6].$ And $7-10^n-1pmod7in [0,6]$, hence the result:
$$a_n=10^n-1+big(7-(10^n-1pmod7)big)$$






share|cite|improve this answer











$endgroup$




















    3












    $begingroup$

    Hint The function $k mapsto m leftlceil frackm rightrceil$ maps $k$ to the smallest integer multiple of $m$ at least as large as $k$.




    For an integer $n > 0$ the smallest $n$-digit number is $10^n - 1$, so the the smallest $n$-digit number that is a multiple of $7$ is $$7leftlceilfrac10^n - 17rightrceil.$$ The sequence begins $$7, 14, 105, 1001, 10003, ldots .$$ Since $10^n - 1 equiv 3^n - 1 pmod 7$ and $3$ has order $6$ in $Bbb Z_7^times$, (except for the first term, $7$) the smallest $n$-digit number that is a multiple of $7$ is $10^n - 1 + r(n)$, where $r(n)$ depends only on the value of $n pmod 6$, i.e., the trailing digits $4, 5, 1, 3, ldots$ repeat every six terms.







    share|cite|improve this answer











    $endgroup$




















      2












      $begingroup$

      Solve



      $$(10^n+c)bmod 7=0$$ for the smallest positive $c$.



      You have



      $$(10^n+c)bmod7=(10^nbmod 7+cbmod 7)bmod 7=0$$



      so that $$c=7-10^nbmod 7.$$






      share|cite|improve this answer











      $endgroup$













        Your Answer








        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%2f3207020%2fsmallest-n-digit-number-which-is-multiple-of-7%23new-answer', 'question_page');

        );

        Post as a guest















        Required, but never shown

























        3 Answers
        3






        active

        oldest

        votes








        3 Answers
        3






        active

        oldest

        votes









        active

        oldest

        votes






        active

        oldest

        votes









        4












        $begingroup$

        The $n$ th term of the sequence will be $$10^n-1+big(7-(10^n-1pmod7)big)$$



        Because to get a $n$ digit number you will need at least $10^n-1$, now suppose the number is of the form $10^n-1+k$ for some natural $k$, for divisibility we need $(10^n-1+k)equiv 0 pmod7$ and to satisfy the minimality condition we need $kin [0,6].$ And $7-10^n-1pmod7in [0,6]$, hence the result:
        $$a_n=10^n-1+big(7-(10^n-1pmod7)big)$$






        share|cite|improve this answer











        $endgroup$

















          4












          $begingroup$

          The $n$ th term of the sequence will be $$10^n-1+big(7-(10^n-1pmod7)big)$$



          Because to get a $n$ digit number you will need at least $10^n-1$, now suppose the number is of the form $10^n-1+k$ for some natural $k$, for divisibility we need $(10^n-1+k)equiv 0 pmod7$ and to satisfy the minimality condition we need $kin [0,6].$ And $7-10^n-1pmod7in [0,6]$, hence the result:
          $$a_n=10^n-1+big(7-(10^n-1pmod7)big)$$






          share|cite|improve this answer











          $endgroup$















            4












            4








            4





            $begingroup$

            The $n$ th term of the sequence will be $$10^n-1+big(7-(10^n-1pmod7)big)$$



            Because to get a $n$ digit number you will need at least $10^n-1$, now suppose the number is of the form $10^n-1+k$ for some natural $k$, for divisibility we need $(10^n-1+k)equiv 0 pmod7$ and to satisfy the minimality condition we need $kin [0,6].$ And $7-10^n-1pmod7in [0,6]$, hence the result:
            $$a_n=10^n-1+big(7-(10^n-1pmod7)big)$$






            share|cite|improve this answer











            $endgroup$



            The $n$ th term of the sequence will be $$10^n-1+big(7-(10^n-1pmod7)big)$$



            Because to get a $n$ digit number you will need at least $10^n-1$, now suppose the number is of the form $10^n-1+k$ for some natural $k$, for divisibility we need $(10^n-1+k)equiv 0 pmod7$ and to satisfy the minimality condition we need $kin [0,6].$ And $7-10^n-1pmod7in [0,6]$, hence the result:
            $$a_n=10^n-1+big(7-(10^n-1pmod7)big)$$







            share|cite|improve this answer














            share|cite|improve this answer



            share|cite|improve this answer








            edited Apr 29 at 15:36

























            answered Apr 29 at 15:20









            tarit goswamitarit goswami

            2,5291522




            2,5291522





















                3












                $begingroup$

                Hint The function $k mapsto m leftlceil frackm rightrceil$ maps $k$ to the smallest integer multiple of $m$ at least as large as $k$.




                For an integer $n > 0$ the smallest $n$-digit number is $10^n - 1$, so the the smallest $n$-digit number that is a multiple of $7$ is $$7leftlceilfrac10^n - 17rightrceil.$$ The sequence begins $$7, 14, 105, 1001, 10003, ldots .$$ Since $10^n - 1 equiv 3^n - 1 pmod 7$ and $3$ has order $6$ in $Bbb Z_7^times$, (except for the first term, $7$) the smallest $n$-digit number that is a multiple of $7$ is $10^n - 1 + r(n)$, where $r(n)$ depends only on the value of $n pmod 6$, i.e., the trailing digits $4, 5, 1, 3, ldots$ repeat every six terms.







                share|cite|improve this answer











                $endgroup$

















                  3












                  $begingroup$

                  Hint The function $k mapsto m leftlceil frackm rightrceil$ maps $k$ to the smallest integer multiple of $m$ at least as large as $k$.




                  For an integer $n > 0$ the smallest $n$-digit number is $10^n - 1$, so the the smallest $n$-digit number that is a multiple of $7$ is $$7leftlceilfrac10^n - 17rightrceil.$$ The sequence begins $$7, 14, 105, 1001, 10003, ldots .$$ Since $10^n - 1 equiv 3^n - 1 pmod 7$ and $3$ has order $6$ in $Bbb Z_7^times$, (except for the first term, $7$) the smallest $n$-digit number that is a multiple of $7$ is $10^n - 1 + r(n)$, where $r(n)$ depends only on the value of $n pmod 6$, i.e., the trailing digits $4, 5, 1, 3, ldots$ repeat every six terms.







                  share|cite|improve this answer











                  $endgroup$















                    3












                    3








                    3





                    $begingroup$

                    Hint The function $k mapsto m leftlceil frackm rightrceil$ maps $k$ to the smallest integer multiple of $m$ at least as large as $k$.




                    For an integer $n > 0$ the smallest $n$-digit number is $10^n - 1$, so the the smallest $n$-digit number that is a multiple of $7$ is $$7leftlceilfrac10^n - 17rightrceil.$$ The sequence begins $$7, 14, 105, 1001, 10003, ldots .$$ Since $10^n - 1 equiv 3^n - 1 pmod 7$ and $3$ has order $6$ in $Bbb Z_7^times$, (except for the first term, $7$) the smallest $n$-digit number that is a multiple of $7$ is $10^n - 1 + r(n)$, where $r(n)$ depends only on the value of $n pmod 6$, i.e., the trailing digits $4, 5, 1, 3, ldots$ repeat every six terms.







                    share|cite|improve this answer











                    $endgroup$



                    Hint The function $k mapsto m leftlceil frackm rightrceil$ maps $k$ to the smallest integer multiple of $m$ at least as large as $k$.




                    For an integer $n > 0$ the smallest $n$-digit number is $10^n - 1$, so the the smallest $n$-digit number that is a multiple of $7$ is $$7leftlceilfrac10^n - 17rightrceil.$$ The sequence begins $$7, 14, 105, 1001, 10003, ldots .$$ Since $10^n - 1 equiv 3^n - 1 pmod 7$ and $3$ has order $6$ in $Bbb Z_7^times$, (except for the first term, $7$) the smallest $n$-digit number that is a multiple of $7$ is $10^n - 1 + r(n)$, where $r(n)$ depends only on the value of $n pmod 6$, i.e., the trailing digits $4, 5, 1, 3, ldots$ repeat every six terms.








                    share|cite|improve this answer














                    share|cite|improve this answer



                    share|cite|improve this answer








                    edited Apr 29 at 16:36

























                    answered Apr 29 at 15:22









                    TravisTravis

                    65.1k769152




                    65.1k769152





















                        2












                        $begingroup$

                        Solve



                        $$(10^n+c)bmod 7=0$$ for the smallest positive $c$.



                        You have



                        $$(10^n+c)bmod7=(10^nbmod 7+cbmod 7)bmod 7=0$$



                        so that $$c=7-10^nbmod 7.$$






                        share|cite|improve this answer











                        $endgroup$

















                          2












                          $begingroup$

                          Solve



                          $$(10^n+c)bmod 7=0$$ for the smallest positive $c$.



                          You have



                          $$(10^n+c)bmod7=(10^nbmod 7+cbmod 7)bmod 7=0$$



                          so that $$c=7-10^nbmod 7.$$






                          share|cite|improve this answer











                          $endgroup$















                            2












                            2








                            2





                            $begingroup$

                            Solve



                            $$(10^n+c)bmod 7=0$$ for the smallest positive $c$.



                            You have



                            $$(10^n+c)bmod7=(10^nbmod 7+cbmod 7)bmod 7=0$$



                            so that $$c=7-10^nbmod 7.$$






                            share|cite|improve this answer











                            $endgroup$



                            Solve



                            $$(10^n+c)bmod 7=0$$ for the smallest positive $c$.



                            You have



                            $$(10^n+c)bmod7=(10^nbmod 7+cbmod 7)bmod 7=0$$



                            so that $$c=7-10^nbmod 7.$$







                            share|cite|improve this answer














                            share|cite|improve this answer



                            share|cite|improve this answer








                            edited Apr 29 at 15:27

























                            answered Apr 29 at 15:22









                            Yves DaoustYves Daoust

                            135k676233




                            135k676233



























                                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%2f3207020%2fsmallest-n-digit-number-which-is-multiple-of-7%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

                                Grendel Contents Story Scholarship Depictions Notes References Navigation menu10.1093/notesj/gjn112Berserkeree

                                Area configuration aggregation error after install Porto themeMagento 2.1 CE Installed but front/backend not loading/workingCSS not loading on page within Magento 2 pageCannot install module in Magento 2no commands defined in the “setup” namespace. in Magento2Magento 2: Static files are present but shows 404Why do i have to always run the commands to clean cache in Magento 2.1.8?Failure reason: 'Unable to unserialize value.'Error 500 after magento migrationIn production mode the site does not loadMagento 2 : Error 500 after installing

                                Middle Expansion Olielle Resaix Definition: Uttering songs of triumph shouting with joy triumphant exulting Sejunction Journal 붙다 달 고급 품목 외출 The stretch trades the screeching tin. Definition: The act of speaking with a drawl a drawl Cough Sand Definition: An uproar a quarrel a noisy outbreak Shake Iron Publicize Horse House Baby 사과 Resaix Flaggy Jelly Temporary Unequaled Puppet A drop in the bucket Shrew 성격 회원 성질 미팅 The burn frames the tacky quality. Materialistic The smoke reduces the way. Yammoe Nondescript Cheek 얼굴 배 약하다 날리다 타다 The illegal country shows the iron. Help Rule Drearien Smoke Teaching Meaty Wasp Abraham Lincoln Jaws 진심 수리하다 Size Cork Idea Convert Think Lark John Lennon 거울 청소 군 추천하다 아이스크림