When g and -g are both primitive roots











up vote
1
down vote

favorite












The question states:




Let $g$ by a primitive root of the odd prime $p$. Show that $-g$ is a primitive root , or not, according as $p equiv 1 pmod 4$ or not.




For me, I cannot see any connection between the type of primes and the primitive root. Any Hint is highly appreciated.



Thanks










share|cite|improve this question


















  • 2




    Possible duplicate of math.stackexchange.com/questions/1229270/…
    – lhf
    Nov 25 at 13:06















up vote
1
down vote

favorite












The question states:




Let $g$ by a primitive root of the odd prime $p$. Show that $-g$ is a primitive root , or not, according as $p equiv 1 pmod 4$ or not.




For me, I cannot see any connection between the type of primes and the primitive root. Any Hint is highly appreciated.



Thanks










share|cite|improve this question


















  • 2




    Possible duplicate of math.stackexchange.com/questions/1229270/…
    – lhf
    Nov 25 at 13:06













up vote
1
down vote

favorite









up vote
1
down vote

favorite











The question states:




Let $g$ by a primitive root of the odd prime $p$. Show that $-g$ is a primitive root , or not, according as $p equiv 1 pmod 4$ or not.




For me, I cannot see any connection between the type of primes and the primitive root. Any Hint is highly appreciated.



Thanks










share|cite|improve this question













The question states:




Let $g$ by a primitive root of the odd prime $p$. Show that $-g$ is a primitive root , or not, according as $p equiv 1 pmod 4$ or not.




For me, I cannot see any connection between the type of primes and the primitive root. Any Hint is highly appreciated.



Thanks







number-theory elementary-number-theory modular-arithmetic divisibility primitive-roots






share|cite|improve this question













share|cite|improve this question











share|cite|improve this question




share|cite|improve this question










asked Nov 23 at 20:58









Maged Saeed

777316




777316








  • 2




    Possible duplicate of math.stackexchange.com/questions/1229270/…
    – lhf
    Nov 25 at 13:06














  • 2




    Possible duplicate of math.stackexchange.com/questions/1229270/…
    – lhf
    Nov 25 at 13:06








2




2




Possible duplicate of math.stackexchange.com/questions/1229270/…
– lhf
Nov 25 at 13:06




Possible duplicate of math.stackexchange.com/questions/1229270/…
– lhf
Nov 25 at 13:06










2 Answers
2






active

oldest

votes

















up vote
2
down vote



accepted










Hint: $-g$ is a primitive root iff $-g = g^k$ with $gcd(k,p-1)=1$. Connect this with the key fact:




$-1$ is a square mod $p$ iff $p equiv 1 bmod 4$




Partial solution:



If $-g$ is a primitive root, then $-g equiv g^k$ with $gcd(k,p-1)=1$ and so $-1 equiv g^{k-1}$. Now $k$ is odd because $gcd(k,p-1)=1$. Therefore, $k-1$ is even and $-1$ is a square mod $p$. Write $-1 equiv a^2$. Then $a$ has order $4$ mod $p$ and so $4$ divides $p-1$, that is $p equiv 1 bmod 4$.






share|cite|improve this answer























  • Another hint: is $u$ and $v$ are squares, so is $uv$.
    – JavaMan
    Nov 23 at 22:48










  • It seems that I am way beyond understanding even these hints. I will make a review to the topic then come back. Please be available next time :).
    – Maged Saeed
    Nov 24 at 20:51












  • Hi @lhf. How $a$ has an order of 4?
    – Maged Saeed
    Dec 5 at 16:32








  • 1




    @MagedSaeed, $a ne1, a^2=-1ne1, a^4=1$.
    – lhf
    Dec 5 at 17:01












  • Hi @lhf. Please, consider reading my proof in the answer I have posted to this question. Many Thanks.
    – Maged Saeed
    Dec 7 at 16:18


















up vote
0
down vote













I have came up with this proof after a discussion with a friend of mine. The proof does not use anything from quadratic residue.



First of all, consider this fact:




If $a$ is of order $h$ $pmod n$, then $a^k$ is of order $frac{h}{gcd(h,k)} quad quad quadquad quad (1)$




The Proof:



Since $g$ is a primitive root, $-1 equiv g^{frac{p-1}{2}} pmod p$. Therefore, $-g equiv (-1)(g) equiv g^{frac{p-1}{2}}g equiv g^{frac{p+1}{2}} pmod p$. Now, the order of $g^{frac{p+1}{2}} pmod p$ according to $(1)$ is $frac{p-1}{gcd(frac{p+1}{2},p-1)}$. If $pequiv 1 pmod 4$, then $frac{p+1}{2}$ is odd and ${gcd(frac{p+1}{2},p-1)}$ is 1 making the order of $-g$ to be $p-1$. i.e. a primitive root. Otherwise, the term $frac{p+1}{2}$ is even and ${gcd(frac{p+1}{2},p-1)} > 1$. Therefore, the order of $-g$ is not $p-1$. i.e. not a primitive root.






share|cite|improve this answer























    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%2f3010827%2fwhen-g-and-g-are-both-primitive-roots%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








    up vote
    2
    down vote



    accepted










    Hint: $-g$ is a primitive root iff $-g = g^k$ with $gcd(k,p-1)=1$. Connect this with the key fact:




    $-1$ is a square mod $p$ iff $p equiv 1 bmod 4$




    Partial solution:



    If $-g$ is a primitive root, then $-g equiv g^k$ with $gcd(k,p-1)=1$ and so $-1 equiv g^{k-1}$. Now $k$ is odd because $gcd(k,p-1)=1$. Therefore, $k-1$ is even and $-1$ is a square mod $p$. Write $-1 equiv a^2$. Then $a$ has order $4$ mod $p$ and so $4$ divides $p-1$, that is $p equiv 1 bmod 4$.






    share|cite|improve this answer























    • Another hint: is $u$ and $v$ are squares, so is $uv$.
      – JavaMan
      Nov 23 at 22:48










    • It seems that I am way beyond understanding even these hints. I will make a review to the topic then come back. Please be available next time :).
      – Maged Saeed
      Nov 24 at 20:51












    • Hi @lhf. How $a$ has an order of 4?
      – Maged Saeed
      Dec 5 at 16:32








    • 1




      @MagedSaeed, $a ne1, a^2=-1ne1, a^4=1$.
      – lhf
      Dec 5 at 17:01












    • Hi @lhf. Please, consider reading my proof in the answer I have posted to this question. Many Thanks.
      – Maged Saeed
      Dec 7 at 16:18















    up vote
    2
    down vote



    accepted










    Hint: $-g$ is a primitive root iff $-g = g^k$ with $gcd(k,p-1)=1$. Connect this with the key fact:




    $-1$ is a square mod $p$ iff $p equiv 1 bmod 4$




    Partial solution:



    If $-g$ is a primitive root, then $-g equiv g^k$ with $gcd(k,p-1)=1$ and so $-1 equiv g^{k-1}$. Now $k$ is odd because $gcd(k,p-1)=1$. Therefore, $k-1$ is even and $-1$ is a square mod $p$. Write $-1 equiv a^2$. Then $a$ has order $4$ mod $p$ and so $4$ divides $p-1$, that is $p equiv 1 bmod 4$.






    share|cite|improve this answer























    • Another hint: is $u$ and $v$ are squares, so is $uv$.
      – JavaMan
      Nov 23 at 22:48










    • It seems that I am way beyond understanding even these hints. I will make a review to the topic then come back. Please be available next time :).
      – Maged Saeed
      Nov 24 at 20:51












    • Hi @lhf. How $a$ has an order of 4?
      – Maged Saeed
      Dec 5 at 16:32








    • 1




      @MagedSaeed, $a ne1, a^2=-1ne1, a^4=1$.
      – lhf
      Dec 5 at 17:01












    • Hi @lhf. Please, consider reading my proof in the answer I have posted to this question. Many Thanks.
      – Maged Saeed
      Dec 7 at 16:18













    up vote
    2
    down vote



    accepted







    up vote
    2
    down vote



    accepted






    Hint: $-g$ is a primitive root iff $-g = g^k$ with $gcd(k,p-1)=1$. Connect this with the key fact:




    $-1$ is a square mod $p$ iff $p equiv 1 bmod 4$




    Partial solution:



    If $-g$ is a primitive root, then $-g equiv g^k$ with $gcd(k,p-1)=1$ and so $-1 equiv g^{k-1}$. Now $k$ is odd because $gcd(k,p-1)=1$. Therefore, $k-1$ is even and $-1$ is a square mod $p$. Write $-1 equiv a^2$. Then $a$ has order $4$ mod $p$ and so $4$ divides $p-1$, that is $p equiv 1 bmod 4$.






    share|cite|improve this answer














    Hint: $-g$ is a primitive root iff $-g = g^k$ with $gcd(k,p-1)=1$. Connect this with the key fact:




    $-1$ is a square mod $p$ iff $p equiv 1 bmod 4$




    Partial solution:



    If $-g$ is a primitive root, then $-g equiv g^k$ with $gcd(k,p-1)=1$ and so $-1 equiv g^{k-1}$. Now $k$ is odd because $gcd(k,p-1)=1$. Therefore, $k-1$ is even and $-1$ is a square mod $p$. Write $-1 equiv a^2$. Then $a$ has order $4$ mod $p$ and so $4$ divides $p-1$, that is $p equiv 1 bmod 4$.







    share|cite|improve this answer














    share|cite|improve this answer



    share|cite|improve this answer








    edited Nov 25 at 13:04

























    answered Nov 23 at 22:27









    lhf

    162k9166385




    162k9166385












    • Another hint: is $u$ and $v$ are squares, so is $uv$.
      – JavaMan
      Nov 23 at 22:48










    • It seems that I am way beyond understanding even these hints. I will make a review to the topic then come back. Please be available next time :).
      – Maged Saeed
      Nov 24 at 20:51












    • Hi @lhf. How $a$ has an order of 4?
      – Maged Saeed
      Dec 5 at 16:32








    • 1




      @MagedSaeed, $a ne1, a^2=-1ne1, a^4=1$.
      – lhf
      Dec 5 at 17:01












    • Hi @lhf. Please, consider reading my proof in the answer I have posted to this question. Many Thanks.
      – Maged Saeed
      Dec 7 at 16:18


















    • Another hint: is $u$ and $v$ are squares, so is $uv$.
      – JavaMan
      Nov 23 at 22:48










    • It seems that I am way beyond understanding even these hints. I will make a review to the topic then come back. Please be available next time :).
      – Maged Saeed
      Nov 24 at 20:51












    • Hi @lhf. How $a$ has an order of 4?
      – Maged Saeed
      Dec 5 at 16:32








    • 1




      @MagedSaeed, $a ne1, a^2=-1ne1, a^4=1$.
      – lhf
      Dec 5 at 17:01












    • Hi @lhf. Please, consider reading my proof in the answer I have posted to this question. Many Thanks.
      – Maged Saeed
      Dec 7 at 16:18
















    Another hint: is $u$ and $v$ are squares, so is $uv$.
    – JavaMan
    Nov 23 at 22:48




    Another hint: is $u$ and $v$ are squares, so is $uv$.
    – JavaMan
    Nov 23 at 22:48












    It seems that I am way beyond understanding even these hints. I will make a review to the topic then come back. Please be available next time :).
    – Maged Saeed
    Nov 24 at 20:51






    It seems that I am way beyond understanding even these hints. I will make a review to the topic then come back. Please be available next time :).
    – Maged Saeed
    Nov 24 at 20:51














    Hi @lhf. How $a$ has an order of 4?
    – Maged Saeed
    Dec 5 at 16:32






    Hi @lhf. How $a$ has an order of 4?
    – Maged Saeed
    Dec 5 at 16:32






    1




    1




    @MagedSaeed, $a ne1, a^2=-1ne1, a^4=1$.
    – lhf
    Dec 5 at 17:01






    @MagedSaeed, $a ne1, a^2=-1ne1, a^4=1$.
    – lhf
    Dec 5 at 17:01














    Hi @lhf. Please, consider reading my proof in the answer I have posted to this question. Many Thanks.
    – Maged Saeed
    Dec 7 at 16:18




    Hi @lhf. Please, consider reading my proof in the answer I have posted to this question. Many Thanks.
    – Maged Saeed
    Dec 7 at 16:18










    up vote
    0
    down vote













    I have came up with this proof after a discussion with a friend of mine. The proof does not use anything from quadratic residue.



    First of all, consider this fact:




    If $a$ is of order $h$ $pmod n$, then $a^k$ is of order $frac{h}{gcd(h,k)} quad quad quadquad quad (1)$




    The Proof:



    Since $g$ is a primitive root, $-1 equiv g^{frac{p-1}{2}} pmod p$. Therefore, $-g equiv (-1)(g) equiv g^{frac{p-1}{2}}g equiv g^{frac{p+1}{2}} pmod p$. Now, the order of $g^{frac{p+1}{2}} pmod p$ according to $(1)$ is $frac{p-1}{gcd(frac{p+1}{2},p-1)}$. If $pequiv 1 pmod 4$, then $frac{p+1}{2}$ is odd and ${gcd(frac{p+1}{2},p-1)}$ is 1 making the order of $-g$ to be $p-1$. i.e. a primitive root. Otherwise, the term $frac{p+1}{2}$ is even and ${gcd(frac{p+1}{2},p-1)} > 1$. Therefore, the order of $-g$ is not $p-1$. i.e. not a primitive root.






    share|cite|improve this answer



























      up vote
      0
      down vote













      I have came up with this proof after a discussion with a friend of mine. The proof does not use anything from quadratic residue.



      First of all, consider this fact:




      If $a$ is of order $h$ $pmod n$, then $a^k$ is of order $frac{h}{gcd(h,k)} quad quad quadquad quad (1)$




      The Proof:



      Since $g$ is a primitive root, $-1 equiv g^{frac{p-1}{2}} pmod p$. Therefore, $-g equiv (-1)(g) equiv g^{frac{p-1}{2}}g equiv g^{frac{p+1}{2}} pmod p$. Now, the order of $g^{frac{p+1}{2}} pmod p$ according to $(1)$ is $frac{p-1}{gcd(frac{p+1}{2},p-1)}$. If $pequiv 1 pmod 4$, then $frac{p+1}{2}$ is odd and ${gcd(frac{p+1}{2},p-1)}$ is 1 making the order of $-g$ to be $p-1$. i.e. a primitive root. Otherwise, the term $frac{p+1}{2}$ is even and ${gcd(frac{p+1}{2},p-1)} > 1$. Therefore, the order of $-g$ is not $p-1$. i.e. not a primitive root.






      share|cite|improve this answer

























        up vote
        0
        down vote










        up vote
        0
        down vote









        I have came up with this proof after a discussion with a friend of mine. The proof does not use anything from quadratic residue.



        First of all, consider this fact:




        If $a$ is of order $h$ $pmod n$, then $a^k$ is of order $frac{h}{gcd(h,k)} quad quad quadquad quad (1)$




        The Proof:



        Since $g$ is a primitive root, $-1 equiv g^{frac{p-1}{2}} pmod p$. Therefore, $-g equiv (-1)(g) equiv g^{frac{p-1}{2}}g equiv g^{frac{p+1}{2}} pmod p$. Now, the order of $g^{frac{p+1}{2}} pmod p$ according to $(1)$ is $frac{p-1}{gcd(frac{p+1}{2},p-1)}$. If $pequiv 1 pmod 4$, then $frac{p+1}{2}$ is odd and ${gcd(frac{p+1}{2},p-1)}$ is 1 making the order of $-g$ to be $p-1$. i.e. a primitive root. Otherwise, the term $frac{p+1}{2}$ is even and ${gcd(frac{p+1}{2},p-1)} > 1$. Therefore, the order of $-g$ is not $p-1$. i.e. not a primitive root.






        share|cite|improve this answer














        I have came up with this proof after a discussion with a friend of mine. The proof does not use anything from quadratic residue.



        First of all, consider this fact:




        If $a$ is of order $h$ $pmod n$, then $a^k$ is of order $frac{h}{gcd(h,k)} quad quad quadquad quad (1)$




        The Proof:



        Since $g$ is a primitive root, $-1 equiv g^{frac{p-1}{2}} pmod p$. Therefore, $-g equiv (-1)(g) equiv g^{frac{p-1}{2}}g equiv g^{frac{p+1}{2}} pmod p$. Now, the order of $g^{frac{p+1}{2}} pmod p$ according to $(1)$ is $frac{p-1}{gcd(frac{p+1}{2},p-1)}$. If $pequiv 1 pmod 4$, then $frac{p+1}{2}$ is odd and ${gcd(frac{p+1}{2},p-1)}$ is 1 making the order of $-g$ to be $p-1$. i.e. a primitive root. Otherwise, the term $frac{p+1}{2}$ is even and ${gcd(frac{p+1}{2},p-1)} > 1$. Therefore, the order of $-g$ is not $p-1$. i.e. not a primitive root.







        share|cite|improve this answer














        share|cite|improve this answer



        share|cite|improve this answer








        edited Dec 7 at 16:35

























        answered Dec 7 at 16:17









        Maged Saeed

        777316




        777316






























            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.





            Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


            Please pay close attention to the following guidance:


            • 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.


            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%2f3010827%2fwhen-g-and-g-are-both-primitive-roots%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

            Probability when a professor distributes a quiz and homework assignment to a class of n students.

            Aardman Animations

            Are they similar matrix