Calculate: $x=2^{12} pmod{13}$ in $mathbb{Z}_{13}$












3












$begingroup$



Calculate: $x=2^{12} pmod{13}$ in $mathbb{Z}_{13}$ by using Fermat's Little Theorem.




So I tried it like this but I don't know if I did it correctly?



Since the $text{gcd}(2,13)=1$ we can use Fermat which says that



$$2^{12}equiv1pmod{13}$$



So we can write:



$$x equiv 2^{12}equiv1pmod{13}$$



Thus the solution will be $1 pmod{13}$ ?










share|cite|improve this question











$endgroup$








  • 4




    $begingroup$
    You're not using Fermat correctly (well you are, but not for the reason you think you are) : the reason you can use it is because 13 is prime, and because 13 does not divide 2, not only because $gcd(2,13)=1$
    $endgroup$
    – Astyx
    Nov 17 '16 at 17:51






  • 1




    $begingroup$
    @Astyx If $p$ is prime, $ainmathbb Z^+$, then $pnmid a$ is equivalent to $gcd(p,a)=1$.
    $endgroup$
    – user236182
    Nov 17 '16 at 17:52








  • 2




    $begingroup$
    @user236182 I absolutely agree, hence the "not only because ..." :)
    $endgroup$
    – Astyx
    Nov 17 '16 at 17:55










  • $begingroup$
    Thank you very much for these info! Is the rest really fine how I wrote it? It seems like a strange theorem to me and the way it's written. Really correct?
    $endgroup$
    – cnmesr
    Nov 17 '16 at 17:57










  • $begingroup$
    It's correct.${}$
    $endgroup$
    – user236182
    Nov 17 '16 at 17:59
















3












$begingroup$



Calculate: $x=2^{12} pmod{13}$ in $mathbb{Z}_{13}$ by using Fermat's Little Theorem.




So I tried it like this but I don't know if I did it correctly?



Since the $text{gcd}(2,13)=1$ we can use Fermat which says that



$$2^{12}equiv1pmod{13}$$



So we can write:



$$x equiv 2^{12}equiv1pmod{13}$$



Thus the solution will be $1 pmod{13}$ ?










share|cite|improve this question











$endgroup$








  • 4




    $begingroup$
    You're not using Fermat correctly (well you are, but not for the reason you think you are) : the reason you can use it is because 13 is prime, and because 13 does not divide 2, not only because $gcd(2,13)=1$
    $endgroup$
    – Astyx
    Nov 17 '16 at 17:51






  • 1




    $begingroup$
    @Astyx If $p$ is prime, $ainmathbb Z^+$, then $pnmid a$ is equivalent to $gcd(p,a)=1$.
    $endgroup$
    – user236182
    Nov 17 '16 at 17:52








  • 2




    $begingroup$
    @user236182 I absolutely agree, hence the "not only because ..." :)
    $endgroup$
    – Astyx
    Nov 17 '16 at 17:55










  • $begingroup$
    Thank you very much for these info! Is the rest really fine how I wrote it? It seems like a strange theorem to me and the way it's written. Really correct?
    $endgroup$
    – cnmesr
    Nov 17 '16 at 17:57










  • $begingroup$
    It's correct.${}$
    $endgroup$
    – user236182
    Nov 17 '16 at 17:59














3












3








3





$begingroup$



Calculate: $x=2^{12} pmod{13}$ in $mathbb{Z}_{13}$ by using Fermat's Little Theorem.




So I tried it like this but I don't know if I did it correctly?



Since the $text{gcd}(2,13)=1$ we can use Fermat which says that



$$2^{12}equiv1pmod{13}$$



So we can write:



$$x equiv 2^{12}equiv1pmod{13}$$



Thus the solution will be $1 pmod{13}$ ?










share|cite|improve this question











$endgroup$





Calculate: $x=2^{12} pmod{13}$ in $mathbb{Z}_{13}$ by using Fermat's Little Theorem.




So I tried it like this but I don't know if I did it correctly?



Since the $text{gcd}(2,13)=1$ we can use Fermat which says that



$$2^{12}equiv1pmod{13}$$



So we can write:



$$x equiv 2^{12}equiv1pmod{13}$$



Thus the solution will be $1 pmod{13}$ ?







elementary-number-theory proof-verification modular-arithmetic






share|cite|improve this question















share|cite|improve this question













share|cite|improve this question




share|cite|improve this question








edited Jan 4 at 1:15









Eevee Trainer

5,4791936




5,4791936










asked Nov 17 '16 at 17:44









cnmesrcnmesr

2,16341942




2,16341942








  • 4




    $begingroup$
    You're not using Fermat correctly (well you are, but not for the reason you think you are) : the reason you can use it is because 13 is prime, and because 13 does not divide 2, not only because $gcd(2,13)=1$
    $endgroup$
    – Astyx
    Nov 17 '16 at 17:51






  • 1




    $begingroup$
    @Astyx If $p$ is prime, $ainmathbb Z^+$, then $pnmid a$ is equivalent to $gcd(p,a)=1$.
    $endgroup$
    – user236182
    Nov 17 '16 at 17:52








  • 2




    $begingroup$
    @user236182 I absolutely agree, hence the "not only because ..." :)
    $endgroup$
    – Astyx
    Nov 17 '16 at 17:55










  • $begingroup$
    Thank you very much for these info! Is the rest really fine how I wrote it? It seems like a strange theorem to me and the way it's written. Really correct?
    $endgroup$
    – cnmesr
    Nov 17 '16 at 17:57










  • $begingroup$
    It's correct.${}$
    $endgroup$
    – user236182
    Nov 17 '16 at 17:59














  • 4




    $begingroup$
    You're not using Fermat correctly (well you are, but not for the reason you think you are) : the reason you can use it is because 13 is prime, and because 13 does not divide 2, not only because $gcd(2,13)=1$
    $endgroup$
    – Astyx
    Nov 17 '16 at 17:51






  • 1




    $begingroup$
    @Astyx If $p$ is prime, $ainmathbb Z^+$, then $pnmid a$ is equivalent to $gcd(p,a)=1$.
    $endgroup$
    – user236182
    Nov 17 '16 at 17:52








  • 2




    $begingroup$
    @user236182 I absolutely agree, hence the "not only because ..." :)
    $endgroup$
    – Astyx
    Nov 17 '16 at 17:55










  • $begingroup$
    Thank you very much for these info! Is the rest really fine how I wrote it? It seems like a strange theorem to me and the way it's written. Really correct?
    $endgroup$
    – cnmesr
    Nov 17 '16 at 17:57










  • $begingroup$
    It's correct.${}$
    $endgroup$
    – user236182
    Nov 17 '16 at 17:59








4




4




$begingroup$
You're not using Fermat correctly (well you are, but not for the reason you think you are) : the reason you can use it is because 13 is prime, and because 13 does not divide 2, not only because $gcd(2,13)=1$
$endgroup$
– Astyx
Nov 17 '16 at 17:51




$begingroup$
You're not using Fermat correctly (well you are, but not for the reason you think you are) : the reason you can use it is because 13 is prime, and because 13 does not divide 2, not only because $gcd(2,13)=1$
$endgroup$
– Astyx
Nov 17 '16 at 17:51




1




1




$begingroup$
@Astyx If $p$ is prime, $ainmathbb Z^+$, then $pnmid a$ is equivalent to $gcd(p,a)=1$.
$endgroup$
– user236182
Nov 17 '16 at 17:52






$begingroup$
@Astyx If $p$ is prime, $ainmathbb Z^+$, then $pnmid a$ is equivalent to $gcd(p,a)=1$.
$endgroup$
– user236182
Nov 17 '16 at 17:52






2




2




$begingroup$
@user236182 I absolutely agree, hence the "not only because ..." :)
$endgroup$
– Astyx
Nov 17 '16 at 17:55




$begingroup$
@user236182 I absolutely agree, hence the "not only because ..." :)
$endgroup$
– Astyx
Nov 17 '16 at 17:55












$begingroup$
Thank you very much for these info! Is the rest really fine how I wrote it? It seems like a strange theorem to me and the way it's written. Really correct?
$endgroup$
– cnmesr
Nov 17 '16 at 17:57




$begingroup$
Thank you very much for these info! Is the rest really fine how I wrote it? It seems like a strange theorem to me and the way it's written. Really correct?
$endgroup$
– cnmesr
Nov 17 '16 at 17:57












$begingroup$
It's correct.${}$
$endgroup$
– user236182
Nov 17 '16 at 17:59




$begingroup$
It's correct.${}$
$endgroup$
– user236182
Nov 17 '16 at 17:59










2 Answers
2






active

oldest

votes


















1












$begingroup$

It might worth noting that your solution is easy to check in this case: it is worth memorizing your powers of $2$, or at least certain specific ones (e.g. $2^{10}$). In this case, $2^{12} = 4,096$, which leaves a remainder of $1$ when divided by $13$. In this case, you thus use that to verify you're correct, but it's understandable that this is (a) not the method intended to be used and (b) might not be feasible for the general case.





Anyhow, let us remember Fermat's Little Theorem:




Fermat's Little Theorem: Let $p$ be prime, and $a$ an integer. Then $a^p - a$ is a multiple of $p$. This can be stated symbolically in a few ways: namely:



$$p | (a^p - a) ;;;;;;;;;; frac{a^p - a}{p} = k in mathbb{Z} ;;;;;;;;;; a^p equiv a pmod p$$



Corollary/Implication: If $p not | a$, then this implies $a^{p-1} - 1$ is a multiple of $p$. Again, equivalent formulations:



$$p | (a^{p-1} - 1) ;;;;;;;;;; frac{a^{p-1} - 1}{p} = k in mathbb{Z} ;;;;;;;;;; a^{p-1} equiv 1 pmod p$$




We use this latter form of Fermat's Little Theorem in this problem, with $a = 2, p = 13$.



Then by Fermat's Little Theorem, since $p = 13$ is a prime which does divide $a = 2$, we can claim the following:



$$2^{13-1} equiv 1 pmod {13} iff 2^{12} equiv 1 pmod {13}$$



When $mathbb{Z}_{13}$ denotes the integers mod $13$, then it is clear $1 in mathbb{Z}_{13}$, and thus $x = 1$ in this problem.





Your proof is more or less right, but Fermat's Little Theorem is not used correctly. Having $gcd(2,13) = 1$ is not a sufficient condition for the corollary of Fermat's Little Theorem: one of them must also be prime. (Then $gcd(a,p) = 1$ would imply the necessary condition of non-divisibility.) As an example, $gcd(15, 14) = 1$ but neither are prime, which means Fermat's Little Theorem could not be used if $a,p$ each were one of $14,15$.






share|cite|improve this answer











$endgroup$





















    1












    $begingroup$

    Fermat's little theorem says $a^{12}cong1pmod{13}$ for $aneq0pmod{13}$. Thus $2^{12}cong1pmod{13}$. So $x=1$.






    share|cite|improve this answer









    $endgroup$













      Your Answer





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

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

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

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


      }
      });














      draft saved

      draft discarded


















      StackExchange.ready(
      function () {
      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f2018726%2fcalculate-x-212-pmod13-in-mathbbz-13%23new-answer', 'question_page');
      }
      );

      Post as a guest















      Required, but never shown

























      2 Answers
      2






      active

      oldest

      votes








      2 Answers
      2






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes









      1












      $begingroup$

      It might worth noting that your solution is easy to check in this case: it is worth memorizing your powers of $2$, or at least certain specific ones (e.g. $2^{10}$). In this case, $2^{12} = 4,096$, which leaves a remainder of $1$ when divided by $13$. In this case, you thus use that to verify you're correct, but it's understandable that this is (a) not the method intended to be used and (b) might not be feasible for the general case.





      Anyhow, let us remember Fermat's Little Theorem:




      Fermat's Little Theorem: Let $p$ be prime, and $a$ an integer. Then $a^p - a$ is a multiple of $p$. This can be stated symbolically in a few ways: namely:



      $$p | (a^p - a) ;;;;;;;;;; frac{a^p - a}{p} = k in mathbb{Z} ;;;;;;;;;; a^p equiv a pmod p$$



      Corollary/Implication: If $p not | a$, then this implies $a^{p-1} - 1$ is a multiple of $p$. Again, equivalent formulations:



      $$p | (a^{p-1} - 1) ;;;;;;;;;; frac{a^{p-1} - 1}{p} = k in mathbb{Z} ;;;;;;;;;; a^{p-1} equiv 1 pmod p$$




      We use this latter form of Fermat's Little Theorem in this problem, with $a = 2, p = 13$.



      Then by Fermat's Little Theorem, since $p = 13$ is a prime which does divide $a = 2$, we can claim the following:



      $$2^{13-1} equiv 1 pmod {13} iff 2^{12} equiv 1 pmod {13}$$



      When $mathbb{Z}_{13}$ denotes the integers mod $13$, then it is clear $1 in mathbb{Z}_{13}$, and thus $x = 1$ in this problem.





      Your proof is more or less right, but Fermat's Little Theorem is not used correctly. Having $gcd(2,13) = 1$ is not a sufficient condition for the corollary of Fermat's Little Theorem: one of them must also be prime. (Then $gcd(a,p) = 1$ would imply the necessary condition of non-divisibility.) As an example, $gcd(15, 14) = 1$ but neither are prime, which means Fermat's Little Theorem could not be used if $a,p$ each were one of $14,15$.






      share|cite|improve this answer











      $endgroup$


















        1












        $begingroup$

        It might worth noting that your solution is easy to check in this case: it is worth memorizing your powers of $2$, or at least certain specific ones (e.g. $2^{10}$). In this case, $2^{12} = 4,096$, which leaves a remainder of $1$ when divided by $13$. In this case, you thus use that to verify you're correct, but it's understandable that this is (a) not the method intended to be used and (b) might not be feasible for the general case.





        Anyhow, let us remember Fermat's Little Theorem:




        Fermat's Little Theorem: Let $p$ be prime, and $a$ an integer. Then $a^p - a$ is a multiple of $p$. This can be stated symbolically in a few ways: namely:



        $$p | (a^p - a) ;;;;;;;;;; frac{a^p - a}{p} = k in mathbb{Z} ;;;;;;;;;; a^p equiv a pmod p$$



        Corollary/Implication: If $p not | a$, then this implies $a^{p-1} - 1$ is a multiple of $p$. Again, equivalent formulations:



        $$p | (a^{p-1} - 1) ;;;;;;;;;; frac{a^{p-1} - 1}{p} = k in mathbb{Z} ;;;;;;;;;; a^{p-1} equiv 1 pmod p$$




        We use this latter form of Fermat's Little Theorem in this problem, with $a = 2, p = 13$.



        Then by Fermat's Little Theorem, since $p = 13$ is a prime which does divide $a = 2$, we can claim the following:



        $$2^{13-1} equiv 1 pmod {13} iff 2^{12} equiv 1 pmod {13}$$



        When $mathbb{Z}_{13}$ denotes the integers mod $13$, then it is clear $1 in mathbb{Z}_{13}$, and thus $x = 1$ in this problem.





        Your proof is more or less right, but Fermat's Little Theorem is not used correctly. Having $gcd(2,13) = 1$ is not a sufficient condition for the corollary of Fermat's Little Theorem: one of them must also be prime. (Then $gcd(a,p) = 1$ would imply the necessary condition of non-divisibility.) As an example, $gcd(15, 14) = 1$ but neither are prime, which means Fermat's Little Theorem could not be used if $a,p$ each were one of $14,15$.






        share|cite|improve this answer











        $endgroup$
















          1












          1








          1





          $begingroup$

          It might worth noting that your solution is easy to check in this case: it is worth memorizing your powers of $2$, or at least certain specific ones (e.g. $2^{10}$). In this case, $2^{12} = 4,096$, which leaves a remainder of $1$ when divided by $13$. In this case, you thus use that to verify you're correct, but it's understandable that this is (a) not the method intended to be used and (b) might not be feasible for the general case.





          Anyhow, let us remember Fermat's Little Theorem:




          Fermat's Little Theorem: Let $p$ be prime, and $a$ an integer. Then $a^p - a$ is a multiple of $p$. This can be stated symbolically in a few ways: namely:



          $$p | (a^p - a) ;;;;;;;;;; frac{a^p - a}{p} = k in mathbb{Z} ;;;;;;;;;; a^p equiv a pmod p$$



          Corollary/Implication: If $p not | a$, then this implies $a^{p-1} - 1$ is a multiple of $p$. Again, equivalent formulations:



          $$p | (a^{p-1} - 1) ;;;;;;;;;; frac{a^{p-1} - 1}{p} = k in mathbb{Z} ;;;;;;;;;; a^{p-1} equiv 1 pmod p$$




          We use this latter form of Fermat's Little Theorem in this problem, with $a = 2, p = 13$.



          Then by Fermat's Little Theorem, since $p = 13$ is a prime which does divide $a = 2$, we can claim the following:



          $$2^{13-1} equiv 1 pmod {13} iff 2^{12} equiv 1 pmod {13}$$



          When $mathbb{Z}_{13}$ denotes the integers mod $13$, then it is clear $1 in mathbb{Z}_{13}$, and thus $x = 1$ in this problem.





          Your proof is more or less right, but Fermat's Little Theorem is not used correctly. Having $gcd(2,13) = 1$ is not a sufficient condition for the corollary of Fermat's Little Theorem: one of them must also be prime. (Then $gcd(a,p) = 1$ would imply the necessary condition of non-divisibility.) As an example, $gcd(15, 14) = 1$ but neither are prime, which means Fermat's Little Theorem could not be used if $a,p$ each were one of $14,15$.






          share|cite|improve this answer











          $endgroup$



          It might worth noting that your solution is easy to check in this case: it is worth memorizing your powers of $2$, or at least certain specific ones (e.g. $2^{10}$). In this case, $2^{12} = 4,096$, which leaves a remainder of $1$ when divided by $13$. In this case, you thus use that to verify you're correct, but it's understandable that this is (a) not the method intended to be used and (b) might not be feasible for the general case.





          Anyhow, let us remember Fermat's Little Theorem:




          Fermat's Little Theorem: Let $p$ be prime, and $a$ an integer. Then $a^p - a$ is a multiple of $p$. This can be stated symbolically in a few ways: namely:



          $$p | (a^p - a) ;;;;;;;;;; frac{a^p - a}{p} = k in mathbb{Z} ;;;;;;;;;; a^p equiv a pmod p$$



          Corollary/Implication: If $p not | a$, then this implies $a^{p-1} - 1$ is a multiple of $p$. Again, equivalent formulations:



          $$p | (a^{p-1} - 1) ;;;;;;;;;; frac{a^{p-1} - 1}{p} = k in mathbb{Z} ;;;;;;;;;; a^{p-1} equiv 1 pmod p$$




          We use this latter form of Fermat's Little Theorem in this problem, with $a = 2, p = 13$.



          Then by Fermat's Little Theorem, since $p = 13$ is a prime which does divide $a = 2$, we can claim the following:



          $$2^{13-1} equiv 1 pmod {13} iff 2^{12} equiv 1 pmod {13}$$



          When $mathbb{Z}_{13}$ denotes the integers mod $13$, then it is clear $1 in mathbb{Z}_{13}$, and thus $x = 1$ in this problem.





          Your proof is more or less right, but Fermat's Little Theorem is not used correctly. Having $gcd(2,13) = 1$ is not a sufficient condition for the corollary of Fermat's Little Theorem: one of them must also be prime. (Then $gcd(a,p) = 1$ would imply the necessary condition of non-divisibility.) As an example, $gcd(15, 14) = 1$ but neither are prime, which means Fermat's Little Theorem could not be used if $a,p$ each were one of $14,15$.







          share|cite|improve this answer














          share|cite|improve this answer



          share|cite|improve this answer








          edited Jan 10 at 0:06

























          answered Jan 4 at 1:11









          Eevee TrainerEevee Trainer

          5,4791936




          5,4791936























              1












              $begingroup$

              Fermat's little theorem says $a^{12}cong1pmod{13}$ for $aneq0pmod{13}$. Thus $2^{12}cong1pmod{13}$. So $x=1$.






              share|cite|improve this answer









              $endgroup$


















                1












                $begingroup$

                Fermat's little theorem says $a^{12}cong1pmod{13}$ for $aneq0pmod{13}$. Thus $2^{12}cong1pmod{13}$. So $x=1$.






                share|cite|improve this answer









                $endgroup$
















                  1












                  1








                  1





                  $begingroup$

                  Fermat's little theorem says $a^{12}cong1pmod{13}$ for $aneq0pmod{13}$. Thus $2^{12}cong1pmod{13}$. So $x=1$.






                  share|cite|improve this answer









                  $endgroup$



                  Fermat's little theorem says $a^{12}cong1pmod{13}$ for $aneq0pmod{13}$. Thus $2^{12}cong1pmod{13}$. So $x=1$.







                  share|cite|improve this answer












                  share|cite|improve this answer



                  share|cite|improve this answer










                  answered Jan 10 at 0:46









                  Chris CusterChris Custer

                  11.4k3824




                  11.4k3824






























                      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%2f2018726%2fcalculate-x-212-pmod13-in-mathbbz-13%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

                      MongoDB - Not Authorized To Execute Command

                      Npm cannot find a required file even through it is in the searched directory

                      in spring boot 2.1 many test slices are not allowed anymore due to multiple @BootstrapWith