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?

                                        Србија Садржај Етимологија Географија Историја Политички систем и уставно-правно уређење Становништво Привреда Образовање Култура Спорт Државни празници Галерија Напомене Референце Литература Спољашње везе Мени за навигацију44°48′N 20°28′E / 44.800° СГШ; 20.467° ИГД / 44.800; 20.46744°48′N 20°28′E / 44.800° СГШ; 20.467° ИГД / 44.800; 20.467ууРезултати пописа 2011. према старости и полуу„Положај, рељеф и клима”„Europe: Serbia”„Основни подаци”„Gross domestic product based on purchasing-power-parity (PPP) valuation of country GDP”„Human Development Report 2018 – "Human Development Indices and Indicators 6”„Устав Републике Србије”Правопис српскога језикаGoogle DriveComparative Hungarian Cultural StudiesCalcium and Magnesium in Groundwater: Occurrence and Significance for Human Health„UNSD — Methodology”„Процене становништва | Републички завод за статистику Србије”The Age of Nepotism: Travel Journals and Observations from the Balkans During the Depression„The Serbian Revolution and the Serbian State”„Устав Србије”„Serbia a few steps away from concluding WTO accession negotiations”„A credible enlargement perspective for and enhanced EU engagement with the Western Balkans”„Freedom in the World 2017”„Serbia: On the Way to EU Accession”„Human Development Indices and Indicators: 2018 Statistical Update”„2018 Social Progress Index”„Global Peace Index”Sabres of Two Easts: An Untold History of Muslims in Eastern Europe, Their Friends and Foes„Пројекат Растко—Лузица”„Serbia: Introduction”„Serbia”оригинала„The World Factbook: Serbia”„The World Factbook: Kosovo”„Border Police Department”„Uredba o kontroli prelaska administrativne linije prema Autonomnoj pokrajini Kosovo i Metohija”оригиналаIvana Carevic, Velimir Jovanovic, STRATIGRAPHIC-STRUCTURAL CHARACTERISTICS OF MAČVA BASIN, UDC 911.2:551.7(497.11), pp. 1Archived„About the Carpathians – Carpathian Heritage Society”оригинала„O Srbiji”оригинала„Статистички годишњак Србије, 2009: Географски прегледГеографија за осми разред основне школе„Отворена, електронска база едукационих радова”„Влада Републике Србије: Положај, рељеф и клима”„Копрен (Стара планина)”„Туристичка дестинација-Србија”„Висина водопада”„РХМЗ — Републички Хидрометеоролошки завод Србије Кнеза Вишеслава 66 Београд”„Фауна Србије”„Српске шуме на издисају”„Lepih šest odsto Srbije”„Илустрована историја Срба — Увод”„Винчанска култура - Градска општина Гроцка”„''„Винча — Праисторијска метропола”''”оригиналаЈужни Словени под византијском влашћу (600—1025)Држава маћедонских Словена„Карађорђе истина и мит, Проф. др Радош Љушић, Вечерње новости, фељтон, 18 наставака, 24. август - 10. септембар 2003.”„Политика: Како је утврђена војна неутралност, 13. јануар. 2010, приступљено децембра 2012.”„Србија и РС оживеле Дејтонски споразум”„Са српским пасошем у 104 земље”Војска Србије | О Војсци | Војска Србије — Улога, намена и задациАрхивираноВојска Србије | ОрганизацијаАрхивираноОдлука о изради Стратегије просторног развоја Републике Србије до 2020. годинеЗакон о територијалној организацији Републике СрбијеЗакон о државној управиНајчешће постављана питања.„Смањење броја статистичких региона кроз измене Закона о регионалном развоју”„2011 Human development Report”„Službena upotreba jezika i pisama”„Попис становништва, домаћинстава и станова 2011. године у Републици Србији. Књига 4: Вероисповест, матерњи језик и национална припадност”„Вероисповест, матерњи језик и национална”„Специјална известитељка УН за слободу религије и вероисповести Асма Јахангир, код Заштитника грађана Саше Јанковића”„Закон о државним и другим празницима у Републици Србији”„Веронаука у српским школама”„Serbia – Ancestral Genography Atlas”Бела књига Милошевићеве владавинеоригиналаGross domestic product based on purchasing-power-parity (PPP) per capita GDP БДП 2007—2013Актуелни показатељи — Република Србија„Попис становништва, домаћинстава и станова 2011. године у Републици Србији Књига 7: Економска активност”Zemlje kandidati za članstvo u EU„Putin drops South Stream gas pipeline to EU, courts Turkey”„„Соко — историјат””оригинала„„Рембас — историјат””оригинала„„Лубница — историјат””оригинала„„Штаваљ — Историјат””оригинала„„Боговина — историјат””оригинала„„Јасеновац — историјат””оригинала„„Вршка чука — историјат””оригинала„„Ибарски рудници — историјат””оригинала„Закон о просторном плану Републике Србије од 2010 до 2020”„Кривични законик — Недозвољена изградња нуклеарних постројења, члан 267”„Б92: Srbija uklonila obogaćeni uranijum, 25. октобар 2011”„Коришћење енергије ветра у Србији — природни услови и практична примена”„Енергија ветра”„Србија може да прави струју од сунца, биомасе, воде и ветра”„Моја електрана и друге ветрењаче”„Биомаса, струја без инвестиција”„Auto-karte Srbije”„www.srbija.gov.rs Статистике о Србији”оригинала„Статистика зе месец децембар и 2016. годину”„Turizam u Srbiji”„Univerzitet u Beogradu: Vek i po akademskog znanja”„Vojnomedicinska akademija: 165 godina tradicije i napretka”Никола Гиљен, Соња Јовићевић Јов и Јелена Мандић: Мирослављево јеванђеље; Текст је публикован у ревији „Историја” и настао је као део научно-истраживачког рада Фонда „Принцеза Оливера”„World music асоцијација Србије”оригинала„World music у Србији”оригинала„Pogledajte: Boban Marković svira u redakciji „Blica”!”„Eurovision Song Contest 2007 Final”„Projekat Rastko, Alojz Ujes: Joakim Vujic”„Унеско”„Списак локалитета Светске баштине”„Guča i Egzit zaludeli svet”оригинала„Sabor trubača GUČA”„Interesting facts about Exit”оригинала„FIFA Association Information”„Serbia women win EuroBasket title, gain first Olympics berth”„Odbojkašice ispisale istoriju – Srbija je svetski prvak!”„Сајт Ватерполо савеза Србије, Освојене медаље”„Сајт ФК Црвена звезда, Бари”„Сајт ФК Црвена звезда, Токио”„Blic:Zlatna Milica! Mandićeva donela Srbiji najsjajnije odličje u Londonu!”„Милица Мандић освојила златну медаљу („Политика”, 12. август 2012)”„Златни Давор Штефанек”„DŽUDO ŠAMPIONAT Majdov osvojio svetsko zlato”„Španovićeva trećim skokom svih vremena do zlata!”„Чудо Иване Шпановић — 7,24 м („Политика”, 5. март 2017)”The Age of Nepotism: Travel Journals and Observations from the Balkans During the DepressionCalcium and Magnesium in Groundwater: Occurrence and Significance for Human HealthComparative Hungarian Cultural StudiesБела књига Милошевићеве владавинеоригиналаComparative Hungarian Cultural StudiesSabres of Two Easts: An Untold History of Muslims in Eastern Europe, Their Friends and FoesГеографија за осми разред основне школеSerbia: the country, people, life, customsМедијиВодичПодациВлада Републике СрбијеНародна скупштина Републике СрбијеНародна канцеларија председника Републике СрбијеНародна банка СрбијеТуристичка организација СрбијеПортал еУправе Републике СрбијеРепубличко јавно правобранилаштвоууууууWorldCat151202876n851959190000 0000 9526 67094054598-24101000570825ge130919

                                        Barbados Ynhâld Skiednis | Geografy | Demografy | Navigaasjemenu