Prove that $a^(p-1)/2 equiv 1$ (mod p) and $a^(p-1)/2 equiv -1 pmod p$Show that if $p$ is prime and $p equiv 3 pmod 4$, then $fracp-12 notequiv pm1 pmod p$Primitive Roots mod a prime numberDetermine if a number is a primitive rootProve that $x^3 equiv a pmodp$ has a solution where $p equiv 2 pmod3$?Prove that $x^2 equiv -1 pmod p$ has no solutions if prime $p equiv 3 pmod 4$.There is solution for $x^16 equiv 256 pmod p$ for all prime $p$. Prove or disprove it.$2^4n+1 equiv 1 pmod8n+7$, this has been bugging meWilson's theorem and congruenceWhat are all possible values of $ x equiv a^fracp-12 pmod p$?How to solve $n$ in $5^n-1equiv 1 pmodn$Given $xequiv b^(2p-1)/3 pmodp$, show that $x^3 equiv b pmodp$.Show the congruence $x^p-1equiv 1pmodp$ has $p-1$ solutionsNumber Theory: Prove $x^kequiv apmodp$ is solvable for $r^d,r^2d,dots,r^[(p-1)/d]d$.

What is the reasoning behind standardization (dividing by standard deviation)?

What is 管理しきれず?

Emojional cryptic crossword

If I cast the Enlarge/Reduce spell on an arrow, what weapon could it count as?

How to balance a monster modification (zombie)?

Can a university suspend a student even when he has left university?

How to test the sharpness of a knife?

Asserting that Atheism and Theism are both faith based positions

Was World War I a war of liberals against authoritarians?

Is xar preinstalled on macOS?

Does the Shadow Magic sorcerer's Eyes of the Dark feature work on all Darkness spells or just his/her own?

Could any one tell what PN is this Chip? Thanks~

UK Tourist Visa- Enquiry

Does convergence of polynomials imply that of its coefficients?

Recursively updating the MLE as new observations stream in

Symbolism of 18 Journeyers

Why is "la Gestapo" feminine?

Why is participating in the European Parliamentary elections used as a threat?

Animating wave motion in water

What is the difference between something being completely legal and being completely decriminalized?

Norwegian Refugee travel document

Why didn’t Eve recognize the little cockroach as a living organism?

Isn't the word "experience" wrongly used in this context?

Exit shell with shortcut (not typing exit) that closes session properly



Prove that $a^(p-1)/2 equiv 1$ (mod p) and $a^(p-1)/2 equiv -1 pmod p$


Show that if $p$ is prime and $p equiv 3 pmod 4$, then $fracp-12 notequiv pm1 pmod p$Primitive Roots mod a prime numberDetermine if a number is a primitive rootProve that $x^3 equiv a pmodp$ has a solution where $p equiv 2 pmod3$?Prove that $x^2 equiv -1 pmod p$ has no solutions if prime $p equiv 3 pmod 4$.There is solution for $x^16 equiv 256 pmod p$ for all prime $p$. Prove or disprove it.$2^4n+1 equiv 1 pmod8n+7$, this has been bugging meWilson's theorem and congruenceWhat are all possible values of $ x equiv a^fracp-12 pmod p$?How to solve $n$ in $5^n-1equiv 1 pmodn$Given $xequiv b^(2p-1)/3 pmodp$, show that $x^3 equiv b pmodp$.Show the congruence $x^p-1equiv 1pmodp$ has $p-1$ solutionsNumber Theory: Prove $x^kequiv apmodp$ is solvable for $r^d,r^2d,dots,r^[(p-1)/d]d$.













6












$begingroup$


I've stumbled upon this congruence very similar to Fermat's Little Theorem, but I can't seem to wrap my head around how to solve it. It goes like this:




i) Suppose $p$ is prime, $(a,p)=1$ and the congruence $x^2 equiv a pmod p$ has a solution $x$. Prove that $a^(p-1)/2equiv 1 pmod p$.




And the same question but with an additional condition:




ii) Suppose $p$ is prime, $p equiv 3 pmod 4$, $(a,p) = 1$ and the congruence $x^2 equiv a pmod p$ does not have a solution $x$. Prove that $a^(p-1)/2equiv -1 pmod p$.




For i: Since $x^2 equiv a pmod p$ has a solution, we know that $p mid x^2 - a$, hence $kp=x^2-a$ for some integer $k$, or $a = x^2-kp$. Now this doesn't really help me much!



For ii: Similarly stumped.










share|cite|improve this question











$endgroup$







  • 1




    $begingroup$
    As noted in one of the answers, the condition $p equiv 3 pmod4$ in (ii) is superfluous.
    $endgroup$
    – Andreas Caranti
    Sep 23 '13 at 7:53















6












$begingroup$


I've stumbled upon this congruence very similar to Fermat's Little Theorem, but I can't seem to wrap my head around how to solve it. It goes like this:




i) Suppose $p$ is prime, $(a,p)=1$ and the congruence $x^2 equiv a pmod p$ has a solution $x$. Prove that $a^(p-1)/2equiv 1 pmod p$.




And the same question but with an additional condition:




ii) Suppose $p$ is prime, $p equiv 3 pmod 4$, $(a,p) = 1$ and the congruence $x^2 equiv a pmod p$ does not have a solution $x$. Prove that $a^(p-1)/2equiv -1 pmod p$.




For i: Since $x^2 equiv a pmod p$ has a solution, we know that $p mid x^2 - a$, hence $kp=x^2-a$ for some integer $k$, or $a = x^2-kp$. Now this doesn't really help me much!



For ii: Similarly stumped.










share|cite|improve this question











$endgroup$







  • 1




    $begingroup$
    As noted in one of the answers, the condition $p equiv 3 pmod4$ in (ii) is superfluous.
    $endgroup$
    – Andreas Caranti
    Sep 23 '13 at 7:53













6












6








6


2



$begingroup$


I've stumbled upon this congruence very similar to Fermat's Little Theorem, but I can't seem to wrap my head around how to solve it. It goes like this:




i) Suppose $p$ is prime, $(a,p)=1$ and the congruence $x^2 equiv a pmod p$ has a solution $x$. Prove that $a^(p-1)/2equiv 1 pmod p$.




And the same question but with an additional condition:




ii) Suppose $p$ is prime, $p equiv 3 pmod 4$, $(a,p) = 1$ and the congruence $x^2 equiv a pmod p$ does not have a solution $x$. Prove that $a^(p-1)/2equiv -1 pmod p$.




For i: Since $x^2 equiv a pmod p$ has a solution, we know that $p mid x^2 - a$, hence $kp=x^2-a$ for some integer $k$, or $a = x^2-kp$. Now this doesn't really help me much!



For ii: Similarly stumped.










share|cite|improve this question











$endgroup$




I've stumbled upon this congruence very similar to Fermat's Little Theorem, but I can't seem to wrap my head around how to solve it. It goes like this:




i) Suppose $p$ is prime, $(a,p)=1$ and the congruence $x^2 equiv a pmod p$ has a solution $x$. Prove that $a^(p-1)/2equiv 1 pmod p$.




And the same question but with an additional condition:




ii) Suppose $p$ is prime, $p equiv 3 pmod 4$, $(a,p) = 1$ and the congruence $x^2 equiv a pmod p$ does not have a solution $x$. Prove that $a^(p-1)/2equiv -1 pmod p$.




For i: Since $x^2 equiv a pmod p$ has a solution, we know that $p mid x^2 - a$, hence $kp=x^2-a$ for some integer $k$, or $a = x^2-kp$. Now this doesn't really help me much!



For ii: Similarly stumped.







elementary-number-theory






share|cite|improve this question















share|cite|improve this question













share|cite|improve this question




share|cite|improve this question








edited Mar 13 at 4:20









Rócherz

2,9863821




2,9863821










asked Sep 23 '13 at 5:08









NumbersandsoonNumbersandsoon

1,4521636




1,4521636







  • 1




    $begingroup$
    As noted in one of the answers, the condition $p equiv 3 pmod4$ in (ii) is superfluous.
    $endgroup$
    – Andreas Caranti
    Sep 23 '13 at 7:53












  • 1




    $begingroup$
    As noted in one of the answers, the condition $p equiv 3 pmod4$ in (ii) is superfluous.
    $endgroup$
    – Andreas Caranti
    Sep 23 '13 at 7:53







1




1




$begingroup$
As noted in one of the answers, the condition $p equiv 3 pmod4$ in (ii) is superfluous.
$endgroup$
– Andreas Caranti
Sep 23 '13 at 7:53




$begingroup$
As noted in one of the answers, the condition $p equiv 3 pmod4$ in (ii) is superfluous.
$endgroup$
– Andreas Caranti
Sep 23 '13 at 7:53










5 Answers
5






active

oldest

votes


















7












$begingroup$

Hints:



(i) If $x^2 equiv a pmod p$ then what is $a^fracp-12$ as a power of $x$? Do this and apply Fermat's little theorem.



(ii) Write $x=a^fracp-12$. Fermat's little theorem gives you $x^2 equiv 1 pmod p$. Now use the rest of the information you've been given.






share|cite|improve this answer









$endgroup$




















    2












    $begingroup$

    For the first part, note that $x^p-1equiv 1$ by Fermat's little theorem. Then assuming that $p$ is not $2$ (deal with that case separetly), we have $1equiv (x^2)^(p-1)/2equiv a^(p-1)/2$.



    For the second part, let $alpha$ be a primitive element (this means that there is an element $alpha$ in $1,...,p-1$ such that $alpha$ has order exactly $p-1$ (this means that $alpha^i$ will range through $mathbbZ_p^times$ as we let $i=1,2,..,p-1$).



    Then, since $a$ is not a square, we have that $a=alpha^2c+1$, so $$a^(p-1)/2equiv (alpha^2c+1)^(p-1)/2equiv alpha^c(p-1)alpha^(p-1)/2equiv alpha^(p-1)/2$$Now note that $alpha^(p-1)/2$ is a root of $x^2-1$. Also note that $1$ and $-1$ are also roots. Note that we cannot have three roots (the degree of $x^2-1$ is $2$ and over a field, the degree bounds the number of roots), so we have that $alpha^(p-1)/2$ is either $1$ or $-1$, but it cannot be $1$ since the order of $alpha$ is $p-1$, hence it is $-1$, and we are done. I just realized that I did not use the fact that $pequiv 3pmod4$ (all i used was $pneq 2$), so I guess the conditions can be weakened.






    share|cite|improve this answer











    $endgroup$




















      2












      $begingroup$

      For the first one, one just has to compute: $a^(p-1)/2 = x^2(p-1)/2 = x^p-1 = 1 mod p$.



      For the second one, let $p = 4k + 3$. $a^(p-1)/2$ is a root of $X^2 - 1$ (as above) which has only two solutions: $1$ and $-1$. If $a^(p-1)/2 = 1mod p$, $a^(p-1)/2a = a mod p$, and $a^(p-1)/2a = a^(p+1)/2 = a^2(k+1) = (a^k+1)^2$, hence $x^2 = a$ has a solution, which is a contradiction. Hence $a^(p-1)/2 = -1mod p$.






      share|cite|improve this answer











      $endgroup$




















        1












        $begingroup$

        This is an important theorem due to Leonhard Euler reworded in a different essence I think and it is usually proved at the beginning of an introduction to quadratic residues.



        First you need to know that in a complete residue system modulo $p$, there are exactly $fracp-12$ quadratic residues and $fracp-12$ non-residues and the quadratic residues are $1^2,2^2, cdots, (fracp-12)^2$. This could be checked as an easy exercise. If you needed further help with this let me know.



        By using Fermat's little theorem we know that $a^p-1 equiv 1 pmodp$.



        Now I'll give you a sketch of proof for Euler's criterion, you can work out the details on your own. You can factor $a^p-1 -1$ as $$a^p-1-1=(a^(p-1)/2-1)(a^(p-1)/2+1)$$



        $$implies 0 equiv a^p-1-1equiv (a^(p-1)/2-1)(a^(p-1)/2+1) pmodp$$



        But since $p$ is a prime number, then $a^(p-1)/2-1 equiv 0 pmodp$ or $a^(p-1)/2+1 equiv 0 pmodp$



        You can check that $1^2, 2^2, cdots, (fracp-12)^2$ satisfy $x^(p-1)/2 equiv 1 pmodp$. Now if you work out the details now which is easy I think it's obvious that $a$ is a non-residue if and only if $a^(p-1)/2 equiv -1 pmodp$.



        If you're familiar with Legendre's symbol you can state this theorem this way as well:



        $$left(fracapright) equiv a^(p-1)/2 pmod p;;text and left(fracapright) in -1,0,1$$.



        where Legendre's symbol is defined as:



        $$left(fracapright) = begincases;;,1 text if a text is a quadratic residue modulo ptext and a notequiv 0pmodp \-1 text if a text is a quadratic non-residue modulo p\;;,0 text if a equiv 0 pmodp. endcases$$






        share|cite|improve this answer









        $endgroup$




















          1












          $begingroup$

          $newcommandZpmathbbZ/pmathbbZ$Among the many proofs of these facts, let me mention one that uses basically only Fermat's little theorem, and then the fact that a polynomial of degree $n$ over a field has at most $n$ roots. And then of course you need to know that $Zp$ is a field, for $p$ prime.



          I take $p$ to be an odd prime.



          If $0 ne b in Zp$, then the equation
          $$
          x^2 = b^2
          $$
          has the two solutions $x = b, -b$, and no more, because $x^2 - b^2$ is a polynomial of degree $2$ over the field $Zp$.



          It follows that there are
          $$
          fracp-12
          $$
          non-zero squares in $Zp$.



          If $0 ne b in Zp$, we have
          $$
          (b^2)^(p-1)/2 = 1,
          $$
          so if $a = b^2$ is a non-zero square, then
          $$
          a^(p-1)/2 = 1.
          $$



          In other words, the non-zero squares in $Zp$ are roots of the polynomial
          $$
          f = x^(p-1)/2 - 1.
          $$
          Since there are $(p-1)/2$ squares, and $f$ has degree $(p-1)/2$, the non-zero squares are exactly the roots of the $f$.



          So if $a$ is a non-square, we have $a^(p-1)/2 ne 1$. Since
          $$
          (a^(p-1)/2)^2 = 1,
          $$
          we have that $a^(p-1)/2$ is a root of $x^2 - 1$, and it is different from $1$, so $a^(p-1)/2 = -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%2f502089%2fprove-that-ap-1-2-equiv-1-mod-p-and-ap-1-2-equiv-1-pmod-p%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown

























            5 Answers
            5






            active

            oldest

            votes








            5 Answers
            5






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            7












            $begingroup$

            Hints:



            (i) If $x^2 equiv a pmod p$ then what is $a^fracp-12$ as a power of $x$? Do this and apply Fermat's little theorem.



            (ii) Write $x=a^fracp-12$. Fermat's little theorem gives you $x^2 equiv 1 pmod p$. Now use the rest of the information you've been given.






            share|cite|improve this answer









            $endgroup$

















              7












              $begingroup$

              Hints:



              (i) If $x^2 equiv a pmod p$ then what is $a^fracp-12$ as a power of $x$? Do this and apply Fermat's little theorem.



              (ii) Write $x=a^fracp-12$. Fermat's little theorem gives you $x^2 equiv 1 pmod p$. Now use the rest of the information you've been given.






              share|cite|improve this answer









              $endgroup$















                7












                7








                7





                $begingroup$

                Hints:



                (i) If $x^2 equiv a pmod p$ then what is $a^fracp-12$ as a power of $x$? Do this and apply Fermat's little theorem.



                (ii) Write $x=a^fracp-12$. Fermat's little theorem gives you $x^2 equiv 1 pmod p$. Now use the rest of the information you've been given.






                share|cite|improve this answer









                $endgroup$



                Hints:



                (i) If $x^2 equiv a pmod p$ then what is $a^fracp-12$ as a power of $x$? Do this and apply Fermat's little theorem.



                (ii) Write $x=a^fracp-12$. Fermat's little theorem gives you $x^2 equiv 1 pmod p$. Now use the rest of the information you've been given.







                share|cite|improve this answer












                share|cite|improve this answer



                share|cite|improve this answer










                answered Sep 23 '13 at 5:45









                Clive NewsteadClive Newstead

                51.9k474136




                51.9k474136





















                    2












                    $begingroup$

                    For the first part, note that $x^p-1equiv 1$ by Fermat's little theorem. Then assuming that $p$ is not $2$ (deal with that case separetly), we have $1equiv (x^2)^(p-1)/2equiv a^(p-1)/2$.



                    For the second part, let $alpha$ be a primitive element (this means that there is an element $alpha$ in $1,...,p-1$ such that $alpha$ has order exactly $p-1$ (this means that $alpha^i$ will range through $mathbbZ_p^times$ as we let $i=1,2,..,p-1$).



                    Then, since $a$ is not a square, we have that $a=alpha^2c+1$, so $$a^(p-1)/2equiv (alpha^2c+1)^(p-1)/2equiv alpha^c(p-1)alpha^(p-1)/2equiv alpha^(p-1)/2$$Now note that $alpha^(p-1)/2$ is a root of $x^2-1$. Also note that $1$ and $-1$ are also roots. Note that we cannot have three roots (the degree of $x^2-1$ is $2$ and over a field, the degree bounds the number of roots), so we have that $alpha^(p-1)/2$ is either $1$ or $-1$, but it cannot be $1$ since the order of $alpha$ is $p-1$, hence it is $-1$, and we are done. I just realized that I did not use the fact that $pequiv 3pmod4$ (all i used was $pneq 2$), so I guess the conditions can be weakened.






                    share|cite|improve this answer











                    $endgroup$

















                      2












                      $begingroup$

                      For the first part, note that $x^p-1equiv 1$ by Fermat's little theorem. Then assuming that $p$ is not $2$ (deal with that case separetly), we have $1equiv (x^2)^(p-1)/2equiv a^(p-1)/2$.



                      For the second part, let $alpha$ be a primitive element (this means that there is an element $alpha$ in $1,...,p-1$ such that $alpha$ has order exactly $p-1$ (this means that $alpha^i$ will range through $mathbbZ_p^times$ as we let $i=1,2,..,p-1$).



                      Then, since $a$ is not a square, we have that $a=alpha^2c+1$, so $$a^(p-1)/2equiv (alpha^2c+1)^(p-1)/2equiv alpha^c(p-1)alpha^(p-1)/2equiv alpha^(p-1)/2$$Now note that $alpha^(p-1)/2$ is a root of $x^2-1$. Also note that $1$ and $-1$ are also roots. Note that we cannot have three roots (the degree of $x^2-1$ is $2$ and over a field, the degree bounds the number of roots), so we have that $alpha^(p-1)/2$ is either $1$ or $-1$, but it cannot be $1$ since the order of $alpha$ is $p-1$, hence it is $-1$, and we are done. I just realized that I did not use the fact that $pequiv 3pmod4$ (all i used was $pneq 2$), so I guess the conditions can be weakened.






                      share|cite|improve this answer











                      $endgroup$















                        2












                        2








                        2





                        $begingroup$

                        For the first part, note that $x^p-1equiv 1$ by Fermat's little theorem. Then assuming that $p$ is not $2$ (deal with that case separetly), we have $1equiv (x^2)^(p-1)/2equiv a^(p-1)/2$.



                        For the second part, let $alpha$ be a primitive element (this means that there is an element $alpha$ in $1,...,p-1$ such that $alpha$ has order exactly $p-1$ (this means that $alpha^i$ will range through $mathbbZ_p^times$ as we let $i=1,2,..,p-1$).



                        Then, since $a$ is not a square, we have that $a=alpha^2c+1$, so $$a^(p-1)/2equiv (alpha^2c+1)^(p-1)/2equiv alpha^c(p-1)alpha^(p-1)/2equiv alpha^(p-1)/2$$Now note that $alpha^(p-1)/2$ is a root of $x^2-1$. Also note that $1$ and $-1$ are also roots. Note that we cannot have three roots (the degree of $x^2-1$ is $2$ and over a field, the degree bounds the number of roots), so we have that $alpha^(p-1)/2$ is either $1$ or $-1$, but it cannot be $1$ since the order of $alpha$ is $p-1$, hence it is $-1$, and we are done. I just realized that I did not use the fact that $pequiv 3pmod4$ (all i used was $pneq 2$), so I guess the conditions can be weakened.






                        share|cite|improve this answer











                        $endgroup$



                        For the first part, note that $x^p-1equiv 1$ by Fermat's little theorem. Then assuming that $p$ is not $2$ (deal with that case separetly), we have $1equiv (x^2)^(p-1)/2equiv a^(p-1)/2$.



                        For the second part, let $alpha$ be a primitive element (this means that there is an element $alpha$ in $1,...,p-1$ such that $alpha$ has order exactly $p-1$ (this means that $alpha^i$ will range through $mathbbZ_p^times$ as we let $i=1,2,..,p-1$).



                        Then, since $a$ is not a square, we have that $a=alpha^2c+1$, so $$a^(p-1)/2equiv (alpha^2c+1)^(p-1)/2equiv alpha^c(p-1)alpha^(p-1)/2equiv alpha^(p-1)/2$$Now note that $alpha^(p-1)/2$ is a root of $x^2-1$. Also note that $1$ and $-1$ are also roots. Note that we cannot have three roots (the degree of $x^2-1$ is $2$ and over a field, the degree bounds the number of roots), so we have that $alpha^(p-1)/2$ is either $1$ or $-1$, but it cannot be $1$ since the order of $alpha$ is $p-1$, hence it is $-1$, and we are done. I just realized that I did not use the fact that $pequiv 3pmod4$ (all i used was $pneq 2$), so I guess the conditions can be weakened.







                        share|cite|improve this answer














                        share|cite|improve this answer



                        share|cite|improve this answer








                        edited Sep 23 '13 at 5:56

























                        answered Sep 23 '13 at 5:48









                        Daniel MontealegreDaniel Montealegre

                        4,8081644




                        4,8081644





















                            2












                            $begingroup$

                            For the first one, one just has to compute: $a^(p-1)/2 = x^2(p-1)/2 = x^p-1 = 1 mod p$.



                            For the second one, let $p = 4k + 3$. $a^(p-1)/2$ is a root of $X^2 - 1$ (as above) which has only two solutions: $1$ and $-1$. If $a^(p-1)/2 = 1mod p$, $a^(p-1)/2a = a mod p$, and $a^(p-1)/2a = a^(p+1)/2 = a^2(k+1) = (a^k+1)^2$, hence $x^2 = a$ has a solution, which is a contradiction. Hence $a^(p-1)/2 = -1mod p$.






                            share|cite|improve this answer











                            $endgroup$

















                              2












                              $begingroup$

                              For the first one, one just has to compute: $a^(p-1)/2 = x^2(p-1)/2 = x^p-1 = 1 mod p$.



                              For the second one, let $p = 4k + 3$. $a^(p-1)/2$ is a root of $X^2 - 1$ (as above) which has only two solutions: $1$ and $-1$. If $a^(p-1)/2 = 1mod p$, $a^(p-1)/2a = a mod p$, and $a^(p-1)/2a = a^(p+1)/2 = a^2(k+1) = (a^k+1)^2$, hence $x^2 = a$ has a solution, which is a contradiction. Hence $a^(p-1)/2 = -1mod p$.






                              share|cite|improve this answer











                              $endgroup$















                                2












                                2








                                2





                                $begingroup$

                                For the first one, one just has to compute: $a^(p-1)/2 = x^2(p-1)/2 = x^p-1 = 1 mod p$.



                                For the second one, let $p = 4k + 3$. $a^(p-1)/2$ is a root of $X^2 - 1$ (as above) which has only two solutions: $1$ and $-1$. If $a^(p-1)/2 = 1mod p$, $a^(p-1)/2a = a mod p$, and $a^(p-1)/2a = a^(p+1)/2 = a^2(k+1) = (a^k+1)^2$, hence $x^2 = a$ has a solution, which is a contradiction. Hence $a^(p-1)/2 = -1mod p$.






                                share|cite|improve this answer











                                $endgroup$



                                For the first one, one just has to compute: $a^(p-1)/2 = x^2(p-1)/2 = x^p-1 = 1 mod p$.



                                For the second one, let $p = 4k + 3$. $a^(p-1)/2$ is a root of $X^2 - 1$ (as above) which has only two solutions: $1$ and $-1$. If $a^(p-1)/2 = 1mod p$, $a^(p-1)/2a = a mod p$, and $a^(p-1)/2a = a^(p+1)/2 = a^2(k+1) = (a^k+1)^2$, hence $x^2 = a$ has a solution, which is a contradiction. Hence $a^(p-1)/2 = -1mod p$.







                                share|cite|improve this answer














                                share|cite|improve this answer



                                share|cite|improve this answer








                                edited Sep 24 '13 at 5:03

























                                answered Sep 23 '13 at 5:45









                                zarathustrazarathustra

                                4,14011029




                                4,14011029





















                                    1












                                    $begingroup$

                                    This is an important theorem due to Leonhard Euler reworded in a different essence I think and it is usually proved at the beginning of an introduction to quadratic residues.



                                    First you need to know that in a complete residue system modulo $p$, there are exactly $fracp-12$ quadratic residues and $fracp-12$ non-residues and the quadratic residues are $1^2,2^2, cdots, (fracp-12)^2$. This could be checked as an easy exercise. If you needed further help with this let me know.



                                    By using Fermat's little theorem we know that $a^p-1 equiv 1 pmodp$.



                                    Now I'll give you a sketch of proof for Euler's criterion, you can work out the details on your own. You can factor $a^p-1 -1$ as $$a^p-1-1=(a^(p-1)/2-1)(a^(p-1)/2+1)$$



                                    $$implies 0 equiv a^p-1-1equiv (a^(p-1)/2-1)(a^(p-1)/2+1) pmodp$$



                                    But since $p$ is a prime number, then $a^(p-1)/2-1 equiv 0 pmodp$ or $a^(p-1)/2+1 equiv 0 pmodp$



                                    You can check that $1^2, 2^2, cdots, (fracp-12)^2$ satisfy $x^(p-1)/2 equiv 1 pmodp$. Now if you work out the details now which is easy I think it's obvious that $a$ is a non-residue if and only if $a^(p-1)/2 equiv -1 pmodp$.



                                    If you're familiar with Legendre's symbol you can state this theorem this way as well:



                                    $$left(fracapright) equiv a^(p-1)/2 pmod p;;text and left(fracapright) in -1,0,1$$.



                                    where Legendre's symbol is defined as:



                                    $$left(fracapright) = begincases;;,1 text if a text is a quadratic residue modulo ptext and a notequiv 0pmodp \-1 text if a text is a quadratic non-residue modulo p\;;,0 text if a equiv 0 pmodp. endcases$$






                                    share|cite|improve this answer









                                    $endgroup$

















                                      1












                                      $begingroup$

                                      This is an important theorem due to Leonhard Euler reworded in a different essence I think and it is usually proved at the beginning of an introduction to quadratic residues.



                                      First you need to know that in a complete residue system modulo $p$, there are exactly $fracp-12$ quadratic residues and $fracp-12$ non-residues and the quadratic residues are $1^2,2^2, cdots, (fracp-12)^2$. This could be checked as an easy exercise. If you needed further help with this let me know.



                                      By using Fermat's little theorem we know that $a^p-1 equiv 1 pmodp$.



                                      Now I'll give you a sketch of proof for Euler's criterion, you can work out the details on your own. You can factor $a^p-1 -1$ as $$a^p-1-1=(a^(p-1)/2-1)(a^(p-1)/2+1)$$



                                      $$implies 0 equiv a^p-1-1equiv (a^(p-1)/2-1)(a^(p-1)/2+1) pmodp$$



                                      But since $p$ is a prime number, then $a^(p-1)/2-1 equiv 0 pmodp$ or $a^(p-1)/2+1 equiv 0 pmodp$



                                      You can check that $1^2, 2^2, cdots, (fracp-12)^2$ satisfy $x^(p-1)/2 equiv 1 pmodp$. Now if you work out the details now which is easy I think it's obvious that $a$ is a non-residue if and only if $a^(p-1)/2 equiv -1 pmodp$.



                                      If you're familiar with Legendre's symbol you can state this theorem this way as well:



                                      $$left(fracapright) equiv a^(p-1)/2 pmod p;;text and left(fracapright) in -1,0,1$$.



                                      where Legendre's symbol is defined as:



                                      $$left(fracapright) = begincases;;,1 text if a text is a quadratic residue modulo ptext and a notequiv 0pmodp \-1 text if a text is a quadratic non-residue modulo p\;;,0 text if a equiv 0 pmodp. endcases$$






                                      share|cite|improve this answer









                                      $endgroup$















                                        1












                                        1








                                        1





                                        $begingroup$

                                        This is an important theorem due to Leonhard Euler reworded in a different essence I think and it is usually proved at the beginning of an introduction to quadratic residues.



                                        First you need to know that in a complete residue system modulo $p$, there are exactly $fracp-12$ quadratic residues and $fracp-12$ non-residues and the quadratic residues are $1^2,2^2, cdots, (fracp-12)^2$. This could be checked as an easy exercise. If you needed further help with this let me know.



                                        By using Fermat's little theorem we know that $a^p-1 equiv 1 pmodp$.



                                        Now I'll give you a sketch of proof for Euler's criterion, you can work out the details on your own. You can factor $a^p-1 -1$ as $$a^p-1-1=(a^(p-1)/2-1)(a^(p-1)/2+1)$$



                                        $$implies 0 equiv a^p-1-1equiv (a^(p-1)/2-1)(a^(p-1)/2+1) pmodp$$



                                        But since $p$ is a prime number, then $a^(p-1)/2-1 equiv 0 pmodp$ or $a^(p-1)/2+1 equiv 0 pmodp$



                                        You can check that $1^2, 2^2, cdots, (fracp-12)^2$ satisfy $x^(p-1)/2 equiv 1 pmodp$. Now if you work out the details now which is easy I think it's obvious that $a$ is a non-residue if and only if $a^(p-1)/2 equiv -1 pmodp$.



                                        If you're familiar with Legendre's symbol you can state this theorem this way as well:



                                        $$left(fracapright) equiv a^(p-1)/2 pmod p;;text and left(fracapright) in -1,0,1$$.



                                        where Legendre's symbol is defined as:



                                        $$left(fracapright) = begincases;;,1 text if a text is a quadratic residue modulo ptext and a notequiv 0pmodp \-1 text if a text is a quadratic non-residue modulo p\;;,0 text if a equiv 0 pmodp. endcases$$






                                        share|cite|improve this answer









                                        $endgroup$



                                        This is an important theorem due to Leonhard Euler reworded in a different essence I think and it is usually proved at the beginning of an introduction to quadratic residues.



                                        First you need to know that in a complete residue system modulo $p$, there are exactly $fracp-12$ quadratic residues and $fracp-12$ non-residues and the quadratic residues are $1^2,2^2, cdots, (fracp-12)^2$. This could be checked as an easy exercise. If you needed further help with this let me know.



                                        By using Fermat's little theorem we know that $a^p-1 equiv 1 pmodp$.



                                        Now I'll give you a sketch of proof for Euler's criterion, you can work out the details on your own. You can factor $a^p-1 -1$ as $$a^p-1-1=(a^(p-1)/2-1)(a^(p-1)/2+1)$$



                                        $$implies 0 equiv a^p-1-1equiv (a^(p-1)/2-1)(a^(p-1)/2+1) pmodp$$



                                        But since $p$ is a prime number, then $a^(p-1)/2-1 equiv 0 pmodp$ or $a^(p-1)/2+1 equiv 0 pmodp$



                                        You can check that $1^2, 2^2, cdots, (fracp-12)^2$ satisfy $x^(p-1)/2 equiv 1 pmodp$. Now if you work out the details now which is easy I think it's obvious that $a$ is a non-residue if and only if $a^(p-1)/2 equiv -1 pmodp$.



                                        If you're familiar with Legendre's symbol you can state this theorem this way as well:



                                        $$left(fracapright) equiv a^(p-1)/2 pmod p;;text and left(fracapright) in -1,0,1$$.



                                        where Legendre's symbol is defined as:



                                        $$left(fracapright) = begincases;;,1 text if a text is a quadratic residue modulo ptext and a notequiv 0pmodp \-1 text if a text is a quadratic non-residue modulo p\;;,0 text if a equiv 0 pmodp. endcases$$







                                        share|cite|improve this answer












                                        share|cite|improve this answer



                                        share|cite|improve this answer










                                        answered Sep 23 '13 at 7:41









                                        user66733user66733

                                        4,82821450




                                        4,82821450





















                                            1












                                            $begingroup$

                                            $newcommandZpmathbbZ/pmathbbZ$Among the many proofs of these facts, let me mention one that uses basically only Fermat's little theorem, and then the fact that a polynomial of degree $n$ over a field has at most $n$ roots. And then of course you need to know that $Zp$ is a field, for $p$ prime.



                                            I take $p$ to be an odd prime.



                                            If $0 ne b in Zp$, then the equation
                                            $$
                                            x^2 = b^2
                                            $$
                                            has the two solutions $x = b, -b$, and no more, because $x^2 - b^2$ is a polynomial of degree $2$ over the field $Zp$.



                                            It follows that there are
                                            $$
                                            fracp-12
                                            $$
                                            non-zero squares in $Zp$.



                                            If $0 ne b in Zp$, we have
                                            $$
                                            (b^2)^(p-1)/2 = 1,
                                            $$
                                            so if $a = b^2$ is a non-zero square, then
                                            $$
                                            a^(p-1)/2 = 1.
                                            $$



                                            In other words, the non-zero squares in $Zp$ are roots of the polynomial
                                            $$
                                            f = x^(p-1)/2 - 1.
                                            $$
                                            Since there are $(p-1)/2$ squares, and $f$ has degree $(p-1)/2$, the non-zero squares are exactly the roots of the $f$.



                                            So if $a$ is a non-square, we have $a^(p-1)/2 ne 1$. Since
                                            $$
                                            (a^(p-1)/2)^2 = 1,
                                            $$
                                            we have that $a^(p-1)/2$ is a root of $x^2 - 1$, and it is different from $1$, so $a^(p-1)/2 = -1$.






                                            share|cite|improve this answer









                                            $endgroup$

















                                              1












                                              $begingroup$

                                              $newcommandZpmathbbZ/pmathbbZ$Among the many proofs of these facts, let me mention one that uses basically only Fermat's little theorem, and then the fact that a polynomial of degree $n$ over a field has at most $n$ roots. And then of course you need to know that $Zp$ is a field, for $p$ prime.



                                              I take $p$ to be an odd prime.



                                              If $0 ne b in Zp$, then the equation
                                              $$
                                              x^2 = b^2
                                              $$
                                              has the two solutions $x = b, -b$, and no more, because $x^2 - b^2$ is a polynomial of degree $2$ over the field $Zp$.



                                              It follows that there are
                                              $$
                                              fracp-12
                                              $$
                                              non-zero squares in $Zp$.



                                              If $0 ne b in Zp$, we have
                                              $$
                                              (b^2)^(p-1)/2 = 1,
                                              $$
                                              so if $a = b^2$ is a non-zero square, then
                                              $$
                                              a^(p-1)/2 = 1.
                                              $$



                                              In other words, the non-zero squares in $Zp$ are roots of the polynomial
                                              $$
                                              f = x^(p-1)/2 - 1.
                                              $$
                                              Since there are $(p-1)/2$ squares, and $f$ has degree $(p-1)/2$, the non-zero squares are exactly the roots of the $f$.



                                              So if $a$ is a non-square, we have $a^(p-1)/2 ne 1$. Since
                                              $$
                                              (a^(p-1)/2)^2 = 1,
                                              $$
                                              we have that $a^(p-1)/2$ is a root of $x^2 - 1$, and it is different from $1$, so $a^(p-1)/2 = -1$.






                                              share|cite|improve this answer









                                              $endgroup$















                                                1












                                                1








                                                1





                                                $begingroup$

                                                $newcommandZpmathbbZ/pmathbbZ$Among the many proofs of these facts, let me mention one that uses basically only Fermat's little theorem, and then the fact that a polynomial of degree $n$ over a field has at most $n$ roots. And then of course you need to know that $Zp$ is a field, for $p$ prime.



                                                I take $p$ to be an odd prime.



                                                If $0 ne b in Zp$, then the equation
                                                $$
                                                x^2 = b^2
                                                $$
                                                has the two solutions $x = b, -b$, and no more, because $x^2 - b^2$ is a polynomial of degree $2$ over the field $Zp$.



                                                It follows that there are
                                                $$
                                                fracp-12
                                                $$
                                                non-zero squares in $Zp$.



                                                If $0 ne b in Zp$, we have
                                                $$
                                                (b^2)^(p-1)/2 = 1,
                                                $$
                                                so if $a = b^2$ is a non-zero square, then
                                                $$
                                                a^(p-1)/2 = 1.
                                                $$



                                                In other words, the non-zero squares in $Zp$ are roots of the polynomial
                                                $$
                                                f = x^(p-1)/2 - 1.
                                                $$
                                                Since there are $(p-1)/2$ squares, and $f$ has degree $(p-1)/2$, the non-zero squares are exactly the roots of the $f$.



                                                So if $a$ is a non-square, we have $a^(p-1)/2 ne 1$. Since
                                                $$
                                                (a^(p-1)/2)^2 = 1,
                                                $$
                                                we have that $a^(p-1)/2$ is a root of $x^2 - 1$, and it is different from $1$, so $a^(p-1)/2 = -1$.






                                                share|cite|improve this answer









                                                $endgroup$



                                                $newcommandZpmathbbZ/pmathbbZ$Among the many proofs of these facts, let me mention one that uses basically only Fermat's little theorem, and then the fact that a polynomial of degree $n$ over a field has at most $n$ roots. And then of course you need to know that $Zp$ is a field, for $p$ prime.



                                                I take $p$ to be an odd prime.



                                                If $0 ne b in Zp$, then the equation
                                                $$
                                                x^2 = b^2
                                                $$
                                                has the two solutions $x = b, -b$, and no more, because $x^2 - b^2$ is a polynomial of degree $2$ over the field $Zp$.



                                                It follows that there are
                                                $$
                                                fracp-12
                                                $$
                                                non-zero squares in $Zp$.



                                                If $0 ne b in Zp$, we have
                                                $$
                                                (b^2)^(p-1)/2 = 1,
                                                $$
                                                so if $a = b^2$ is a non-zero square, then
                                                $$
                                                a^(p-1)/2 = 1.
                                                $$



                                                In other words, the non-zero squares in $Zp$ are roots of the polynomial
                                                $$
                                                f = x^(p-1)/2 - 1.
                                                $$
                                                Since there are $(p-1)/2$ squares, and $f$ has degree $(p-1)/2$, the non-zero squares are exactly the roots of the $f$.



                                                So if $a$ is a non-square, we have $a^(p-1)/2 ne 1$. Since
                                                $$
                                                (a^(p-1)/2)^2 = 1,
                                                $$
                                                we have that $a^(p-1)/2$ is a root of $x^2 - 1$, and it is different from $1$, so $a^(p-1)/2 = -1$.







                                                share|cite|improve this answer












                                                share|cite|improve this answer



                                                share|cite|improve this answer










                                                answered Sep 23 '13 at 8:45









                                                Andreas CarantiAndreas Caranti

                                                56.8k34397




                                                56.8k34397



























                                                    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%2f502089%2fprove-that-ap-1-2-equiv-1-mod-p-and-ap-1-2-equiv-1-pmod-p%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

                                                    Lowndes Grove History Architecture References Navigation menu32°48′6″N 79°57′58″W / 32.80167°N 79.96611°W / 32.80167; -79.9661132°48′6″N 79°57′58″W / 32.80167°N 79.96611°W / 32.80167; -79.9661178002500"National Register Information System"Historic houses of South Carolina"Lowndes Grove""+32° 48' 6.00", −79° 57' 58.00""Lowndes Grove, Charleston County (260 St. Margaret St., Charleston)""Lowndes Grove"The Charleston ExpositionIt Happened in South Carolina"Lowndes Grove (House), Saint Margaret Street & Sixth Avenue, Charleston, Charleston County, SC(Photographs)"Plantations of the Carolina Low Countrye

                                                    random experiment with two different functions on unit interval Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 23, 2019 at 00:00UTC (8:00pm US/Eastern)Random variable and probability space notionsRandom Walk with EdgesFinding functions where the increase over a random interval is Poisson distributedNumber of days until dayCan an observed event in fact be of zero probability?Unit random processmodels of coins and uniform distributionHow to get the number of successes given $n$ trials , probability $P$ and a random variable $X$Absorbing Markov chain in a computer. Is “almost every” turned into always convergence in computer executions?Stopped random walk is not uniformly integrable

                                                    How should I support this large drywall patch? Planned maintenance scheduled April 23, 2019 at 00:00UTC (8:00pm US/Eastern) Announcing the arrival of Valued Associate #679: Cesar Manara Unicorn Meta Zoo #1: Why another podcast?How do I cover large gaps in drywall?How do I keep drywall around a patch from crumbling?Can I glue a second layer of drywall?How to patch long strip on drywall?Large drywall patch: how to avoid bulging seams?Drywall Mesh Patch vs. Bulge? To remove or not to remove?How to fix this drywall job?Prep drywall before backsplashWhat's the best way to fix this horrible drywall patch job?Drywall patching using 3M Patch Plus Primer