mod Distributive Law, factoring $!!bmod!!:$ $ abbmod ac = a(bbmod c)$ Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 23, 2019 at 23:30UTC (7:30pm US/Eastern)How to find last two digits of $2^2016$Last two digits of $2^1000$ via Chinese Remainder Theorem?Find last 3 digits of $ 2032^2031^2030^dots^2^1$Getting an X for Chinese Remainder Theorem (CRT)Determine the remainder when $f(x) = 3x^5 - 5x^2 + 4x + 1$ is divided by $(x-1)(x+2)$What is $26^32bmod 12$?last two digits of $14^5532$?Divisibility of $(4^2^2n+1-3)$ by 13.Last Two digits of $14^14^14$Calculate remainder of $12^34^56^78$ when divided by $90$Finding the remainderHow to calculate $5^3^1000bmod 101$?Solving $x^5 equiv 7 mod 13$Quadratic nonresidues mod pProve that $2^13-1$ is primeWhy is $34x = 50 text mod 33 Leftrightarrow 1x = 17 text mod 33$?finding smallest natural number $n$ such that $n equiv 1023 mod 2015$ and $n equiv 1302 mod 2016$Find the remainder when $13^13$ is divided by $25$.Is it true that $a^360m + 1 + b^360n + 1 equiv 0 (mod 475) Leftrightarrow a + b equiv 0 (mod 475)$?Solving linear equivalence mod $26$

One-one communication

Lagrange four-squares theorem --- deterministic complexity

How can I prevent/balance waiting and turtling as a response to cooldown mechanics

Is there hard evidence that the grant peer review system performs significantly better than random?

Strange behavior of Object.defineProperty() in JavaScript

Did any compiler fully use 80-bit floating point?

What order were files/directories output in dir?

C's equality operator on converted pointers

Why do early math courses focus on the cross sections of a cone and not on other 3D objects?

How to write capital alpha?

How do living politicians protect their readily obtainable signatures from misuse?

How much damage would a cupful of neutron star matter do to the Earth?

What does it mean that physics no longer uses mechanical models to describe phenomena?

Karn the great creator - 'card from outside the game' in sealed

How many morphisms from 1 to 1+1 can there be?

Do wooden building fires get hotter than 600°C?

Why are vacuum tubes still used in amateur radios?

Unit testing extension method adding view location expander

How long can equipment go unused before powering up runs the risk of damage?

preposition before coffee

Induction Proof for Sequences

Would it be easier to apply for a UK visa if there is a host family to sponsor for you in going there?

What is the difference between a "ranged attack" and a "ranged weapon attack"?

Why are my pictures showing a dark band on one edge?



mod Distributive Law, factoring $!!bmod!!:$ $ abbmod ac = a(bbmod c)$



Announcing the arrival of Valued Associate #679: Cesar Manara
Planned maintenance scheduled April 23, 2019 at 23:30UTC (7:30pm US/Eastern)How to find last two digits of $2^2016$Last two digits of $2^1000$ via Chinese Remainder Theorem?Find last 3 digits of $ 2032^2031^2030^dots^2^1$Getting an X for Chinese Remainder Theorem (CRT)Determine the remainder when $f(x) = 3x^5 - 5x^2 + 4x + 1$ is divided by $(x-1)(x+2)$What is $26^32bmod 12$?last two digits of $14^5532$?Divisibility of $(4^2^2n+1-3)$ by 13.Last Two digits of $14^14^14$Calculate remainder of $12^34^56^78$ when divided by $90$Finding the remainderHow to calculate $5^3^1000bmod 101$?Solving $x^5 equiv 7 mod 13$Quadratic nonresidues mod pProve that $2^13-1$ is primeWhy is $34x = 50 text mod 33 Leftrightarrow 1x = 17 text mod 33$?finding smallest natural number $n$ such that $n equiv 1023 mod 2015$ and $n equiv 1302 mod 2016$Find the remainder when $13^13$ is divided by $25$.Is it true that $a^360m + 1 + b^360n + 1 equiv 0 (mod 475) Leftrightarrow a + b equiv 0 (mod 475)$?Solving linear equivalence mod $26$










5












$begingroup$


I stumbled across this problem




Find $,10^large 5^102$ modulo $35$, i.e. the remainder left after it is divided by $35$




Beginning, we try to find a simplification for $10$ to get:
$$10 equiv 1 text mod 7\ 10^2 equiv 2 text mod 7 \ 10^3 equiv 6 text mod 7$$



As these problems are meant to be done without a calculator, calculating this further is cumbersome. The solution, however, states that since $35 = 5 cdot 7$, then we only need to find $10^5^102 text mod 7$. I can see (not immediately) the logic behind this. Basically, since $10^k$ is always divisible by $5$ for any sensical $k$, then:
$$10^k - r = 5(7)k$$
But then it's not immediately obvious how/why the fact that $5$ divides $10^k$ helps in this case.



My question is, is in general, if we have some mod system with $a^k equiv r text mod m$ where $m$ can be decomposed into a product of numbers $a times b times c times ...$, we only need to find the mod of those numbers where $a, b, c.....$ doesn't divides $a$? (And if this is the case why?) If this is not the case, then why/how is the solution justified in this specific instance?










share|cite|improve this question











$endgroup$
















    5












    $begingroup$


    I stumbled across this problem




    Find $,10^large 5^102$ modulo $35$, i.e. the remainder left after it is divided by $35$




    Beginning, we try to find a simplification for $10$ to get:
    $$10 equiv 1 text mod 7\ 10^2 equiv 2 text mod 7 \ 10^3 equiv 6 text mod 7$$



    As these problems are meant to be done without a calculator, calculating this further is cumbersome. The solution, however, states that since $35 = 5 cdot 7$, then we only need to find $10^5^102 text mod 7$. I can see (not immediately) the logic behind this. Basically, since $10^k$ is always divisible by $5$ for any sensical $k$, then:
    $$10^k - r = 5(7)k$$
    But then it's not immediately obvious how/why the fact that $5$ divides $10^k$ helps in this case.



    My question is, is in general, if we have some mod system with $a^k equiv r text mod m$ where $m$ can be decomposed into a product of numbers $a times b times c times ...$, we only need to find the mod of those numbers where $a, b, c.....$ doesn't divides $a$? (And if this is the case why?) If this is not the case, then why/how is the solution justified in this specific instance?










    share|cite|improve this question











    $endgroup$














      5












      5








      5


      4



      $begingroup$


      I stumbled across this problem




      Find $,10^large 5^102$ modulo $35$, i.e. the remainder left after it is divided by $35$




      Beginning, we try to find a simplification for $10$ to get:
      $$10 equiv 1 text mod 7\ 10^2 equiv 2 text mod 7 \ 10^3 equiv 6 text mod 7$$



      As these problems are meant to be done without a calculator, calculating this further is cumbersome. The solution, however, states that since $35 = 5 cdot 7$, then we only need to find $10^5^102 text mod 7$. I can see (not immediately) the logic behind this. Basically, since $10^k$ is always divisible by $5$ for any sensical $k$, then:
      $$10^k - r = 5(7)k$$
      But then it's not immediately obvious how/why the fact that $5$ divides $10^k$ helps in this case.



      My question is, is in general, if we have some mod system with $a^k equiv r text mod m$ where $m$ can be decomposed into a product of numbers $a times b times c times ...$, we only need to find the mod of those numbers where $a, b, c.....$ doesn't divides $a$? (And if this is the case why?) If this is not the case, then why/how is the solution justified in this specific instance?










      share|cite|improve this question











      $endgroup$




      I stumbled across this problem




      Find $,10^large 5^102$ modulo $35$, i.e. the remainder left after it is divided by $35$




      Beginning, we try to find a simplification for $10$ to get:
      $$10 equiv 1 text mod 7\ 10^2 equiv 2 text mod 7 \ 10^3 equiv 6 text mod 7$$



      As these problems are meant to be done without a calculator, calculating this further is cumbersome. The solution, however, states that since $35 = 5 cdot 7$, then we only need to find $10^5^102 text mod 7$. I can see (not immediately) the logic behind this. Basically, since $10^k$ is always divisible by $5$ for any sensical $k$, then:
      $$10^k - r = 5(7)k$$
      But then it's not immediately obvious how/why the fact that $5$ divides $10^k$ helps in this case.



      My question is, is in general, if we have some mod system with $a^k equiv r text mod m$ where $m$ can be decomposed into a product of numbers $a times b times c times ...$, we only need to find the mod of those numbers where $a, b, c.....$ doesn't divides $a$? (And if this is the case why?) If this is not the case, then why/how is the solution justified in this specific instance?







      elementary-number-theory modular-arithmetic






      share|cite|improve this question















      share|cite|improve this question













      share|cite|improve this question




      share|cite|improve this question








      edited Apr 12 at 0:23









      Bill Dubuque

      214k29197660




      214k29197660










      asked Dec 15 '16 at 10:42









      q.Thenq.Then

      2,2771921




      2,2771921




















          3 Answers
          3






          active

          oldest

          votes


















          8












          $begingroup$

          The "logic" is that we can use a mod distributive law to pull out a common factor $,c=5,,$ i.e.



          $$ cabmod cn =, c(abmod n)quadqquad $$



          This decreases the modulus from $,cn,$ to $,n, ,$ simplifying modular arithmetic. Also it may eliminate CRT = Chinese Remainder Theorem calculations, eliminating needless inverse computations, which are much more difficult than above for large numbers (or polynomials, e.g. see this answer).



          This distributive law is often more convenient in congruence form, e.g.



          $$quad qquad caequiv c(abmod n) rm if color#d0fcnequiv 0 pmod! m$$



          because we have: $, c(abmod n) equiv c(a! +! kn)equiv ca+k(color#d0fcn)equiv capmod!m$



          e.g. in the OP: $ Ige 1,Rightarrow, 10^large I+N!equiv 10^large I(10^large N!bmod 7) rm by 10^I 7equiv 0,pmod35$



          Let's use that. First note that exponents on $10$ can be reduced mod $,6,$ by little Fermat,



          i.e. notice that $ color#c00rm mod, 7!:, 10^large 6equiv, 1,Rightarrow, color#c0010^large 6Jequiv 1. $ Thus if $ I ge 1 $ then as above



          $phantomrm mod, 35!:, color#0a010^large I+6J!equiv 10^large I 10^large 6J!equiv 10^large I(color#c0010^large 6J!bmod 7)equiv color#0a010^large I,pmod!35 $



          Our power $ 5^large 102 = 1!+!6J $ by $ rm mod, 6!:, 5^large 102!equiv (-1)^large 102!equiv 1$



          Therefore $ 10^large 5^large 102!! = color#0a010^large 1+6J!equiv color#0a010^large 1 pmod!35 $




          Remark $ $ For many more worked examples see the complete list of linked questions. Often this distributive law isn't invoked by name. Rather its trivial proof is repeated inline, e.g. from a recent answer, using $,cn = 14^2cdotcolor#c0025equiv 0pmod100$



          $beginalign&color#c00rm mod 25!: 14equiv 8^large 2Rightarrow, 14^large 10equiv overbrace8^large 20equiv 1^rmlarge Euler phi,Rightarrow, color#0a014^large 10Nequivcolor#c00bf 1\[1em]
          &rm mod 100!:, 14^large 2+10Nequiv 14^large 2, color#0a014^large 10N! equiv 14^large 2!! underbrace(color#c00bf 1 + 25k)_largecolor#0a014^Large 10N!bmodcolor#c0025!!! equiv 14^large 2 equiv, 96endalign$



          This distributive law is actually equivalent to CRT as we sketch below, with $,m,n,$ coprime



          $beginalign x&equiv a!!!pmod! m\ color#c00x&equivcolor#c00 b!!!pmod! nendalign$
          $,Rightarrow, x!-!abmod mn, =, mleft[dfraccolor#c00x-ambmod nright] = mleft[dfraccolor#c00b-ambmod nright]$



          which is exactly the same solution given by Easy CRT. But the operational form of this law often makes it more convenient to apply in computations versus the classical CRT formula.






          share|cite|improve this answer











          $endgroup$




















            1












            $begingroup$

            First, note that $10^7equiv10^1pmod35$.



            Therefore $n>6implies10^nequiv10^n-6pmod35$.



            Let's calculate $5^102bmod6$ using Euler's theorem:



            • $gcd(5,6)=1$

            • Therefore $5^phi(6)equiv1pmod6$

            • $phi(6)=phi(2cdot3)=(2-1)cdot(3-1)=2$

            • Therefore $colorred5^2equivcolorred1pmod6$

            • Therefore $5^102equiv5^2cdot51equiv(colorred5^2)^51equivcolorred1^51equiv1pmod6$

            Therefore $10^5^102equiv10^5^102-6equiv10^5^102-12equiv10^5^102-18equivldotsequiv10^1equiv10pmod35$.






            share|cite|improve this answer











            $endgroup$




















              0












              $begingroup$

              Carrying on from your calculation:
              $$beginalign
              10^3&equiv 6 bmod 7 \
              &equiv -1 bmod 7 \
              implies 10^6 = (10^3)^2&equiv 1 bmod 7
              endalign$$
              We could reach the same conclusion more quickly by observing that $7$ is prime so by Fermat's Little Theorem, $10^(7-1)equiv 1 bmod 7$.



              So we need to know the value of $5^102bmod 6$, and here again $5equiv -1 bmod 6 $ so $5^textevenequiv 1 bmod 6$. (Again there are other ways to the same conclusion, but spotting $-1$ is often useful).



              Thus $10^large 5^102equiv 10^6k+1equiv 10^1equiv 3 bmod 7$.



              Now the final step uses the Chinese remainder theorem for uniqueness of the solution (to congruence):
              $$left .beginalign
              x&equiv 0 bmod 5 \
              x&equiv 3 bmod 7 \
              endalign
              right}implies xequiv 10 bmod 35 $$






              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%2f2059752%2fmod-distributive-law-factoring-bmod-ab-bmod-ac-ab-bmod-c%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









                8












                $begingroup$

                The "logic" is that we can use a mod distributive law to pull out a common factor $,c=5,,$ i.e.



                $$ cabmod cn =, c(abmod n)quadqquad $$



                This decreases the modulus from $,cn,$ to $,n, ,$ simplifying modular arithmetic. Also it may eliminate CRT = Chinese Remainder Theorem calculations, eliminating needless inverse computations, which are much more difficult than above for large numbers (or polynomials, e.g. see this answer).



                This distributive law is often more convenient in congruence form, e.g.



                $$quad qquad caequiv c(abmod n) rm if color#d0fcnequiv 0 pmod! m$$



                because we have: $, c(abmod n) equiv c(a! +! kn)equiv ca+k(color#d0fcn)equiv capmod!m$



                e.g. in the OP: $ Ige 1,Rightarrow, 10^large I+N!equiv 10^large I(10^large N!bmod 7) rm by 10^I 7equiv 0,pmod35$



                Let's use that. First note that exponents on $10$ can be reduced mod $,6,$ by little Fermat,



                i.e. notice that $ color#c00rm mod, 7!:, 10^large 6equiv, 1,Rightarrow, color#c0010^large 6Jequiv 1. $ Thus if $ I ge 1 $ then as above



                $phantomrm mod, 35!:, color#0a010^large I+6J!equiv 10^large I 10^large 6J!equiv 10^large I(color#c0010^large 6J!bmod 7)equiv color#0a010^large I,pmod!35 $



                Our power $ 5^large 102 = 1!+!6J $ by $ rm mod, 6!:, 5^large 102!equiv (-1)^large 102!equiv 1$



                Therefore $ 10^large 5^large 102!! = color#0a010^large 1+6J!equiv color#0a010^large 1 pmod!35 $




                Remark $ $ For many more worked examples see the complete list of linked questions. Often this distributive law isn't invoked by name. Rather its trivial proof is repeated inline, e.g. from a recent answer, using $,cn = 14^2cdotcolor#c0025equiv 0pmod100$



                $beginalign&color#c00rm mod 25!: 14equiv 8^large 2Rightarrow, 14^large 10equiv overbrace8^large 20equiv 1^rmlarge Euler phi,Rightarrow, color#0a014^large 10Nequivcolor#c00bf 1\[1em]
                &rm mod 100!:, 14^large 2+10Nequiv 14^large 2, color#0a014^large 10N! equiv 14^large 2!! underbrace(color#c00bf 1 + 25k)_largecolor#0a014^Large 10N!bmodcolor#c0025!!! equiv 14^large 2 equiv, 96endalign$



                This distributive law is actually equivalent to CRT as we sketch below, with $,m,n,$ coprime



                $beginalign x&equiv a!!!pmod! m\ color#c00x&equivcolor#c00 b!!!pmod! nendalign$
                $,Rightarrow, x!-!abmod mn, =, mleft[dfraccolor#c00x-ambmod nright] = mleft[dfraccolor#c00b-ambmod nright]$



                which is exactly the same solution given by Easy CRT. But the operational form of this law often makes it more convenient to apply in computations versus the classical CRT formula.






                share|cite|improve this answer











                $endgroup$

















                  8












                  $begingroup$

                  The "logic" is that we can use a mod distributive law to pull out a common factor $,c=5,,$ i.e.



                  $$ cabmod cn =, c(abmod n)quadqquad $$



                  This decreases the modulus from $,cn,$ to $,n, ,$ simplifying modular arithmetic. Also it may eliminate CRT = Chinese Remainder Theorem calculations, eliminating needless inverse computations, which are much more difficult than above for large numbers (or polynomials, e.g. see this answer).



                  This distributive law is often more convenient in congruence form, e.g.



                  $$quad qquad caequiv c(abmod n) rm if color#d0fcnequiv 0 pmod! m$$



                  because we have: $, c(abmod n) equiv c(a! +! kn)equiv ca+k(color#d0fcn)equiv capmod!m$



                  e.g. in the OP: $ Ige 1,Rightarrow, 10^large I+N!equiv 10^large I(10^large N!bmod 7) rm by 10^I 7equiv 0,pmod35$



                  Let's use that. First note that exponents on $10$ can be reduced mod $,6,$ by little Fermat,



                  i.e. notice that $ color#c00rm mod, 7!:, 10^large 6equiv, 1,Rightarrow, color#c0010^large 6Jequiv 1. $ Thus if $ I ge 1 $ then as above



                  $phantomrm mod, 35!:, color#0a010^large I+6J!equiv 10^large I 10^large 6J!equiv 10^large I(color#c0010^large 6J!bmod 7)equiv color#0a010^large I,pmod!35 $



                  Our power $ 5^large 102 = 1!+!6J $ by $ rm mod, 6!:, 5^large 102!equiv (-1)^large 102!equiv 1$



                  Therefore $ 10^large 5^large 102!! = color#0a010^large 1+6J!equiv color#0a010^large 1 pmod!35 $




                  Remark $ $ For many more worked examples see the complete list of linked questions. Often this distributive law isn't invoked by name. Rather its trivial proof is repeated inline, e.g. from a recent answer, using $,cn = 14^2cdotcolor#c0025equiv 0pmod100$



                  $beginalign&color#c00rm mod 25!: 14equiv 8^large 2Rightarrow, 14^large 10equiv overbrace8^large 20equiv 1^rmlarge Euler phi,Rightarrow, color#0a014^large 10Nequivcolor#c00bf 1\[1em]
                  &rm mod 100!:, 14^large 2+10Nequiv 14^large 2, color#0a014^large 10N! equiv 14^large 2!! underbrace(color#c00bf 1 + 25k)_largecolor#0a014^Large 10N!bmodcolor#c0025!!! equiv 14^large 2 equiv, 96endalign$



                  This distributive law is actually equivalent to CRT as we sketch below, with $,m,n,$ coprime



                  $beginalign x&equiv a!!!pmod! m\ color#c00x&equivcolor#c00 b!!!pmod! nendalign$
                  $,Rightarrow, x!-!abmod mn, =, mleft[dfraccolor#c00x-ambmod nright] = mleft[dfraccolor#c00b-ambmod nright]$



                  which is exactly the same solution given by Easy CRT. But the operational form of this law often makes it more convenient to apply in computations versus the classical CRT formula.






                  share|cite|improve this answer











                  $endgroup$















                    8












                    8








                    8





                    $begingroup$

                    The "logic" is that we can use a mod distributive law to pull out a common factor $,c=5,,$ i.e.



                    $$ cabmod cn =, c(abmod n)quadqquad $$



                    This decreases the modulus from $,cn,$ to $,n, ,$ simplifying modular arithmetic. Also it may eliminate CRT = Chinese Remainder Theorem calculations, eliminating needless inverse computations, which are much more difficult than above for large numbers (or polynomials, e.g. see this answer).



                    This distributive law is often more convenient in congruence form, e.g.



                    $$quad qquad caequiv c(abmod n) rm if color#d0fcnequiv 0 pmod! m$$



                    because we have: $, c(abmod n) equiv c(a! +! kn)equiv ca+k(color#d0fcn)equiv capmod!m$



                    e.g. in the OP: $ Ige 1,Rightarrow, 10^large I+N!equiv 10^large I(10^large N!bmod 7) rm by 10^I 7equiv 0,pmod35$



                    Let's use that. First note that exponents on $10$ can be reduced mod $,6,$ by little Fermat,



                    i.e. notice that $ color#c00rm mod, 7!:, 10^large 6equiv, 1,Rightarrow, color#c0010^large 6Jequiv 1. $ Thus if $ I ge 1 $ then as above



                    $phantomrm mod, 35!:, color#0a010^large I+6J!equiv 10^large I 10^large 6J!equiv 10^large I(color#c0010^large 6J!bmod 7)equiv color#0a010^large I,pmod!35 $



                    Our power $ 5^large 102 = 1!+!6J $ by $ rm mod, 6!:, 5^large 102!equiv (-1)^large 102!equiv 1$



                    Therefore $ 10^large 5^large 102!! = color#0a010^large 1+6J!equiv color#0a010^large 1 pmod!35 $




                    Remark $ $ For many more worked examples see the complete list of linked questions. Often this distributive law isn't invoked by name. Rather its trivial proof is repeated inline, e.g. from a recent answer, using $,cn = 14^2cdotcolor#c0025equiv 0pmod100$



                    $beginalign&color#c00rm mod 25!: 14equiv 8^large 2Rightarrow, 14^large 10equiv overbrace8^large 20equiv 1^rmlarge Euler phi,Rightarrow, color#0a014^large 10Nequivcolor#c00bf 1\[1em]
                    &rm mod 100!:, 14^large 2+10Nequiv 14^large 2, color#0a014^large 10N! equiv 14^large 2!! underbrace(color#c00bf 1 + 25k)_largecolor#0a014^Large 10N!bmodcolor#c0025!!! equiv 14^large 2 equiv, 96endalign$



                    This distributive law is actually equivalent to CRT as we sketch below, with $,m,n,$ coprime



                    $beginalign x&equiv a!!!pmod! m\ color#c00x&equivcolor#c00 b!!!pmod! nendalign$
                    $,Rightarrow, x!-!abmod mn, =, mleft[dfraccolor#c00x-ambmod nright] = mleft[dfraccolor#c00b-ambmod nright]$



                    which is exactly the same solution given by Easy CRT. But the operational form of this law often makes it more convenient to apply in computations versus the classical CRT formula.






                    share|cite|improve this answer











                    $endgroup$



                    The "logic" is that we can use a mod distributive law to pull out a common factor $,c=5,,$ i.e.



                    $$ cabmod cn =, c(abmod n)quadqquad $$



                    This decreases the modulus from $,cn,$ to $,n, ,$ simplifying modular arithmetic. Also it may eliminate CRT = Chinese Remainder Theorem calculations, eliminating needless inverse computations, which are much more difficult than above for large numbers (or polynomials, e.g. see this answer).



                    This distributive law is often more convenient in congruence form, e.g.



                    $$quad qquad caequiv c(abmod n) rm if color#d0fcnequiv 0 pmod! m$$



                    because we have: $, c(abmod n) equiv c(a! +! kn)equiv ca+k(color#d0fcn)equiv capmod!m$



                    e.g. in the OP: $ Ige 1,Rightarrow, 10^large I+N!equiv 10^large I(10^large N!bmod 7) rm by 10^I 7equiv 0,pmod35$



                    Let's use that. First note that exponents on $10$ can be reduced mod $,6,$ by little Fermat,



                    i.e. notice that $ color#c00rm mod, 7!:, 10^large 6equiv, 1,Rightarrow, color#c0010^large 6Jequiv 1. $ Thus if $ I ge 1 $ then as above



                    $phantomrm mod, 35!:, color#0a010^large I+6J!equiv 10^large I 10^large 6J!equiv 10^large I(color#c0010^large 6J!bmod 7)equiv color#0a010^large I,pmod!35 $



                    Our power $ 5^large 102 = 1!+!6J $ by $ rm mod, 6!:, 5^large 102!equiv (-1)^large 102!equiv 1$



                    Therefore $ 10^large 5^large 102!! = color#0a010^large 1+6J!equiv color#0a010^large 1 pmod!35 $




                    Remark $ $ For many more worked examples see the complete list of linked questions. Often this distributive law isn't invoked by name. Rather its trivial proof is repeated inline, e.g. from a recent answer, using $,cn = 14^2cdotcolor#c0025equiv 0pmod100$



                    $beginalign&color#c00rm mod 25!: 14equiv 8^large 2Rightarrow, 14^large 10equiv overbrace8^large 20equiv 1^rmlarge Euler phi,Rightarrow, color#0a014^large 10Nequivcolor#c00bf 1\[1em]
                    &rm mod 100!:, 14^large 2+10Nequiv 14^large 2, color#0a014^large 10N! equiv 14^large 2!! underbrace(color#c00bf 1 + 25k)_largecolor#0a014^Large 10N!bmodcolor#c0025!!! equiv 14^large 2 equiv, 96endalign$



                    This distributive law is actually equivalent to CRT as we sketch below, with $,m,n,$ coprime



                    $beginalign x&equiv a!!!pmod! m\ color#c00x&equivcolor#c00 b!!!pmod! nendalign$
                    $,Rightarrow, x!-!abmod mn, =, mleft[dfraccolor#c00x-ambmod nright] = mleft[dfraccolor#c00b-ambmod nright]$



                    which is exactly the same solution given by Easy CRT. But the operational form of this law often makes it more convenient to apply in computations versus the classical CRT formula.







                    share|cite|improve this answer














                    share|cite|improve this answer



                    share|cite|improve this answer








                    edited Apr 3 at 14:12









                    Anant

                    5521416




                    5521416










                    answered Dec 15 '16 at 14:29









                    Bill DubuqueBill Dubuque

                    214k29197660




                    214k29197660





















                        1












                        $begingroup$

                        First, note that $10^7equiv10^1pmod35$.



                        Therefore $n>6implies10^nequiv10^n-6pmod35$.



                        Let's calculate $5^102bmod6$ using Euler's theorem:



                        • $gcd(5,6)=1$

                        • Therefore $5^phi(6)equiv1pmod6$

                        • $phi(6)=phi(2cdot3)=(2-1)cdot(3-1)=2$

                        • Therefore $colorred5^2equivcolorred1pmod6$

                        • Therefore $5^102equiv5^2cdot51equiv(colorred5^2)^51equivcolorred1^51equiv1pmod6$

                        Therefore $10^5^102equiv10^5^102-6equiv10^5^102-12equiv10^5^102-18equivldotsequiv10^1equiv10pmod35$.






                        share|cite|improve this answer











                        $endgroup$

















                          1












                          $begingroup$

                          First, note that $10^7equiv10^1pmod35$.



                          Therefore $n>6implies10^nequiv10^n-6pmod35$.



                          Let's calculate $5^102bmod6$ using Euler's theorem:



                          • $gcd(5,6)=1$

                          • Therefore $5^phi(6)equiv1pmod6$

                          • $phi(6)=phi(2cdot3)=(2-1)cdot(3-1)=2$

                          • Therefore $colorred5^2equivcolorred1pmod6$

                          • Therefore $5^102equiv5^2cdot51equiv(colorred5^2)^51equivcolorred1^51equiv1pmod6$

                          Therefore $10^5^102equiv10^5^102-6equiv10^5^102-12equiv10^5^102-18equivldotsequiv10^1equiv10pmod35$.






                          share|cite|improve this answer











                          $endgroup$















                            1












                            1








                            1





                            $begingroup$

                            First, note that $10^7equiv10^1pmod35$.



                            Therefore $n>6implies10^nequiv10^n-6pmod35$.



                            Let's calculate $5^102bmod6$ using Euler's theorem:



                            • $gcd(5,6)=1$

                            • Therefore $5^phi(6)equiv1pmod6$

                            • $phi(6)=phi(2cdot3)=(2-1)cdot(3-1)=2$

                            • Therefore $colorred5^2equivcolorred1pmod6$

                            • Therefore $5^102equiv5^2cdot51equiv(colorred5^2)^51equivcolorred1^51equiv1pmod6$

                            Therefore $10^5^102equiv10^5^102-6equiv10^5^102-12equiv10^5^102-18equivldotsequiv10^1equiv10pmod35$.






                            share|cite|improve this answer











                            $endgroup$



                            First, note that $10^7equiv10^1pmod35$.



                            Therefore $n>6implies10^nequiv10^n-6pmod35$.



                            Let's calculate $5^102bmod6$ using Euler's theorem:



                            • $gcd(5,6)=1$

                            • Therefore $5^phi(6)equiv1pmod6$

                            • $phi(6)=phi(2cdot3)=(2-1)cdot(3-1)=2$

                            • Therefore $colorred5^2equivcolorred1pmod6$

                            • Therefore $5^102equiv5^2cdot51equiv(colorred5^2)^51equivcolorred1^51equiv1pmod6$

                            Therefore $10^5^102equiv10^5^102-6equiv10^5^102-12equiv10^5^102-18equivldotsequiv10^1equiv10pmod35$.







                            share|cite|improve this answer














                            share|cite|improve this answer



                            share|cite|improve this answer








                            edited Dec 17 '16 at 8:34

























                            answered Dec 15 '16 at 11:12









                            barak manosbarak manos

                            38k742104




                            38k742104





















                                0












                                $begingroup$

                                Carrying on from your calculation:
                                $$beginalign
                                10^3&equiv 6 bmod 7 \
                                &equiv -1 bmod 7 \
                                implies 10^6 = (10^3)^2&equiv 1 bmod 7
                                endalign$$
                                We could reach the same conclusion more quickly by observing that $7$ is prime so by Fermat's Little Theorem, $10^(7-1)equiv 1 bmod 7$.



                                So we need to know the value of $5^102bmod 6$, and here again $5equiv -1 bmod 6 $ so $5^textevenequiv 1 bmod 6$. (Again there are other ways to the same conclusion, but spotting $-1$ is often useful).



                                Thus $10^large 5^102equiv 10^6k+1equiv 10^1equiv 3 bmod 7$.



                                Now the final step uses the Chinese remainder theorem for uniqueness of the solution (to congruence):
                                $$left .beginalign
                                x&equiv 0 bmod 5 \
                                x&equiv 3 bmod 7 \
                                endalign
                                right}implies xequiv 10 bmod 35 $$






                                share|cite|improve this answer









                                $endgroup$

















                                  0












                                  $begingroup$

                                  Carrying on from your calculation:
                                  $$beginalign
                                  10^3&equiv 6 bmod 7 \
                                  &equiv -1 bmod 7 \
                                  implies 10^6 = (10^3)^2&equiv 1 bmod 7
                                  endalign$$
                                  We could reach the same conclusion more quickly by observing that $7$ is prime so by Fermat's Little Theorem, $10^(7-1)equiv 1 bmod 7$.



                                  So we need to know the value of $5^102bmod 6$, and here again $5equiv -1 bmod 6 $ so $5^textevenequiv 1 bmod 6$. (Again there are other ways to the same conclusion, but spotting $-1$ is often useful).



                                  Thus $10^large 5^102equiv 10^6k+1equiv 10^1equiv 3 bmod 7$.



                                  Now the final step uses the Chinese remainder theorem for uniqueness of the solution (to congruence):
                                  $$left .beginalign
                                  x&equiv 0 bmod 5 \
                                  x&equiv 3 bmod 7 \
                                  endalign
                                  right}implies xequiv 10 bmod 35 $$






                                  share|cite|improve this answer









                                  $endgroup$















                                    0












                                    0








                                    0





                                    $begingroup$

                                    Carrying on from your calculation:
                                    $$beginalign
                                    10^3&equiv 6 bmod 7 \
                                    &equiv -1 bmod 7 \
                                    implies 10^6 = (10^3)^2&equiv 1 bmod 7
                                    endalign$$
                                    We could reach the same conclusion more quickly by observing that $7$ is prime so by Fermat's Little Theorem, $10^(7-1)equiv 1 bmod 7$.



                                    So we need to know the value of $5^102bmod 6$, and here again $5equiv -1 bmod 6 $ so $5^textevenequiv 1 bmod 6$. (Again there are other ways to the same conclusion, but spotting $-1$ is often useful).



                                    Thus $10^large 5^102equiv 10^6k+1equiv 10^1equiv 3 bmod 7$.



                                    Now the final step uses the Chinese remainder theorem for uniqueness of the solution (to congruence):
                                    $$left .beginalign
                                    x&equiv 0 bmod 5 \
                                    x&equiv 3 bmod 7 \
                                    endalign
                                    right}implies xequiv 10 bmod 35 $$






                                    share|cite|improve this answer









                                    $endgroup$



                                    Carrying on from your calculation:
                                    $$beginalign
                                    10^3&equiv 6 bmod 7 \
                                    &equiv -1 bmod 7 \
                                    implies 10^6 = (10^3)^2&equiv 1 bmod 7
                                    endalign$$
                                    We could reach the same conclusion more quickly by observing that $7$ is prime so by Fermat's Little Theorem, $10^(7-1)equiv 1 bmod 7$.



                                    So we need to know the value of $5^102bmod 6$, and here again $5equiv -1 bmod 6 $ so $5^textevenequiv 1 bmod 6$. (Again there are other ways to the same conclusion, but spotting $-1$ is often useful).



                                    Thus $10^large 5^102equiv 10^6k+1equiv 10^1equiv 3 bmod 7$.



                                    Now the final step uses the Chinese remainder theorem for uniqueness of the solution (to congruence):
                                    $$left .beginalign
                                    x&equiv 0 bmod 5 \
                                    x&equiv 3 bmod 7 \
                                    endalign
                                    right}implies xequiv 10 bmod 35 $$







                                    share|cite|improve this answer












                                    share|cite|improve this answer



                                    share|cite|improve this answer










                                    answered Jul 26 '17 at 17:53









                                    JoffanJoffan

                                    32.6k43269




                                    32.6k43269



























                                        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%2f2059752%2fmod-distributive-law-factoring-bmod-ab-bmod-ac-ab-bmod-c%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

                                        Triangular numbers and gcdProving sum of a set is $0 pmod n$ if $n$ is odd, or $fracn2 pmod n$ if $n$ is even?Is greatest common divisor of two numbers really their smallest linear combination?GCD, LCM RelationshipProve a set of nonnegative integers with greatest common divisor 1 and closed under addition has all but finite many nonnegative integers.all pairs of a and b in an equation containing gcdTriangular Numbers Modulo $k$ - Hit All Values?Understanding the Existence and Uniqueness of the GCDGCD and LCM with logical symbolsThe greatest common divisor of two positive integers less than 100 is equal to 3. Their least common multiple is twelve times one of the integers.Suppose that for all integers $x$, $x|a$ and $x|b$ if and only if $x|c$. Then $c = gcd(a,b)$Which is the gcd of 2 numbers which are multiplied and the result is 600000?

                                        Ingelân Ynhâld Etymology | Geografy | Skiednis | Polityk en bestjoer | Ekonomy | Demografy | Kultuer | Klimaat | Sjoch ek | Keppelings om utens | Boarnen, noaten en referinsjes Navigaasjemenuwww.gov.ukOffisjele webside fan it regear fan it Feriene KeninkrykOffisjele webside fan it Britske FerkearsburoNederlânsktalige ynformaasje fan it Britske FerkearsburoOffisjele webside fan English Heritage, de organisaasje dy't him ynset foar it behâld fan it Ingelske kultuergoedYnwennertallen fan alle Britske stêden út 'e folkstelling fan 2011Notes en References, op dizze sideEngland

                                        Հադիս Բովանդակություն Անվանում և նշանակություն | Դասակարգում | Աղբյուրներ | Նավարկման ցանկ