Every prime occurs as the least quadratic nonresidueQuadratic nonresidues mod pIs the number of quadratic nonresidues modulo $p^2$, greater than the number of quadratic residues modulo $p^2$?elementary proof that infinite primes quadratic residue modulo $p$Proving the existence of consecutive quadratic residues modulo $p>5$ by means of Pell's equationIn $GF(q)$, are there the same number of quadratic residues as quadratic nonresidues?Chowla's Construction of prime having least quadratic non-residue $gg log p$Every primitive root modulo an odd prime is a quadratic nonresiduenumber of quadratic residues and nonresidues modulo p odd primethe solutions are quadratic nonresidues modulo $p$

When did 5 foot squares become standard in D&D?

How to see time in ~/.bash_history file

Translate "Everything burns" into classical Latin

Rule of thumb: how far before changing my chain to prevent cassette wear

Advisor asked my whole slide presentation so she could give the presentation at international conference

Is there a push, in the United States, to use gender-neutral language and gender pronouns (when they are given)?

voltage regulator current draw

I got this nail stuck in my tire, should I plug or replace?

What‘s wrong with my proof of the Law of Total Variance?

What is "demographic engineering" and how does it differ from ethnic cleansing?

3-prong to 4-prong conversion - EXTRA MISLABELLED WIRES - Dryer cable upgrade and installation

How did the warrior lodges help to spread the Heresy?

Why exactly is the answer 50 ohms?

How to protect my Wi-Fi password from being displayed by Android phones when sharing it with QR code?

I am often given, occasionally stolen, rarely sold, and never borrowed

Why do spaceships in Star Wars have wings?

Grignard reagent with sulfur dioxide

How to create a vimrc macro using :sort?

Can Boris Johnson invoke the Civil Contingencies Act to suspend the Benn law?

Armory Automaton and Dowsing Dagger/Sword of the Animist

Front hydraulic disk brake is too powerful on MTB — solutions?

Are Snap and Flatpack apps safe to install? Are they "official", approved or tested for a particular distro version?

Why do Computer Science degrees contain a high proportion of mathematics?

Can there be an atomic nucleus where there are more protons than neutrons?



Every prime occurs as the least quadratic nonresidue


Quadratic nonresidues mod pIs the number of quadratic nonresidues modulo $p^2$, greater than the number of quadratic residues modulo $p^2$?elementary proof that infinite primes quadratic residue modulo $p$Proving the existence of consecutive quadratic residues modulo $p>5$ by means of Pell's equationIn $GF(q)$, are there the same number of quadratic residues as quadratic nonresidues?Chowla's Construction of prime having least quadratic non-residue $gg log p$Every primitive root modulo an odd prime is a quadratic nonresiduenumber of quadratic residues and nonresidues modulo p odd primethe solutions are quadratic nonresidues modulo $p$






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty
margin-bottom:0;

.everyonelovesstackoverflowposition:absolute;height:1px;width:1px;opacity:0;top:0;left:0;pointer-events:none;








6














$begingroup$


It is not difficult to check that the least quadratic nonresidue modulo prime $p$ cannot be a composite number, see, for example: Quadratic nonresidues mod p.



It is quite natural to ask the opposite question: Is every prime the least quadratic non-residue modulo some $p$? In the other words, if we are given a prime $q$, is there $p$ such that $q$ is a quadratic nonresidue modulo $p$ and, at the same time, all numbers $1,2,dots,q-1$ are quadratic residues modulo $p$?



I think I have a proof which I outlined in my answer below. However, the proof uses Dirichlet's theorem on arithmetic progressions, which is rather non-elementary result. I was wondering whether there is a more straightforward solution.



I will also include link to the sequence A000229 in OEIS, which is described as: "a(n) is the least number m such that the n-th prime is the least quadratic nonresidue modulo m."










share|cite|improve this question











$endgroup$






















    6














    $begingroup$


    It is not difficult to check that the least quadratic nonresidue modulo prime $p$ cannot be a composite number, see, for example: Quadratic nonresidues mod p.



    It is quite natural to ask the opposite question: Is every prime the least quadratic non-residue modulo some $p$? In the other words, if we are given a prime $q$, is there $p$ such that $q$ is a quadratic nonresidue modulo $p$ and, at the same time, all numbers $1,2,dots,q-1$ are quadratic residues modulo $p$?



    I think I have a proof which I outlined in my answer below. However, the proof uses Dirichlet's theorem on arithmetic progressions, which is rather non-elementary result. I was wondering whether there is a more straightforward solution.



    I will also include link to the sequence A000229 in OEIS, which is described as: "a(n) is the least number m such that the n-th prime is the least quadratic nonresidue modulo m."










    share|cite|improve this question











    $endgroup$


















      6












      6








      6


      1



      $begingroup$


      It is not difficult to check that the least quadratic nonresidue modulo prime $p$ cannot be a composite number, see, for example: Quadratic nonresidues mod p.



      It is quite natural to ask the opposite question: Is every prime the least quadratic non-residue modulo some $p$? In the other words, if we are given a prime $q$, is there $p$ such that $q$ is a quadratic nonresidue modulo $p$ and, at the same time, all numbers $1,2,dots,q-1$ are quadratic residues modulo $p$?



      I think I have a proof which I outlined in my answer below. However, the proof uses Dirichlet's theorem on arithmetic progressions, which is rather non-elementary result. I was wondering whether there is a more straightforward solution.



      I will also include link to the sequence A000229 in OEIS, which is described as: "a(n) is the least number m such that the n-th prime is the least quadratic nonresidue modulo m."










      share|cite|improve this question











      $endgroup$




      It is not difficult to check that the least quadratic nonresidue modulo prime $p$ cannot be a composite number, see, for example: Quadratic nonresidues mod p.



      It is quite natural to ask the opposite question: Is every prime the least quadratic non-residue modulo some $p$? In the other words, if we are given a prime $q$, is there $p$ such that $q$ is a quadratic nonresidue modulo $p$ and, at the same time, all numbers $1,2,dots,q-1$ are quadratic residues modulo $p$?



      I think I have a proof which I outlined in my answer below. However, the proof uses Dirichlet's theorem on arithmetic progressions, which is rather non-elementary result. I was wondering whether there is a more straightforward solution.



      I will also include link to the sequence A000229 in OEIS, which is described as: "a(n) is the least number m such that the n-th prime is the least quadratic nonresidue modulo m."







      number-theory prime-numbers quadratic-residues






      share|cite|improve this question















      share|cite|improve this question













      share|cite|improve this question




      share|cite|improve this question



      share|cite|improve this question








      edited 5 hours ago







      Martin Sleziak

















      asked 8 hours ago









      Martin SleziakMartin Sleziak

      46.8k11 gold badges131 silver badges286 bronze badges




      46.8k11 gold badges131 silver badges286 bronze badges























          1 Answer
          1






          active

          oldest

          votes


















          6
















          $begingroup$

          The approach taken in this proof is similar to the proof of Theorem 3 in Section 5.2 of Ireland, Rosen: A Classical Introduction to Modern Number Theory. This theorem states that for every non-square integer $a$ there are infinitely many primes $p$ such that $a$ is a quadratic non-residue modulo $p$.




          $newcommandjaco[2]left(frac#1#2right)$Let $q=p_k$ be the $k$-th prime, we also consider all smaller primes $p_1=2<p_2<dots<p_k-1<p_k$. We want to find $p$ such that
          $$jaco 2p=jacop_2p = dots = jacop_k-1p = 1 qquadtextaqquad jacop_kp=-1. tag*$$
          If there is such $p$, then




          • $p_k$ is a quadratic non-residue modulo $p$;

          • all smaller primes are quadratic residues modulo $p$.

          Since the smallest quadratic non-residue must be prime, we get that $p_k$ the smallest quadratic non-residue modulo $p$.



          To get a prime which fulfills $(*)$, we consider the system of congruences
          beginalign*
          p &equiv 1pmod8\
          p &equiv 1pmodp_2\
          &vdots\
          p &equiv 1pmodp_k-1\
          p &equiv spmodp_k
          endalign*

          where $s$ a is some quadratic non-residue modulo $p_k$.



          First, this system of congruences is equivalent to $pequiv a pmod8p_2cdots p_k$ for some $a$, i.e., the solutions form an arithmetic progression. Moreover, it is easy to see that $gcd(a,8p_2cdots p_k)$, since $a$ fulfills all congruences listed above. So we get from Dirichlet's theorem that there is a prime number $p$ which fulfills this system of congruences.



          For any such prime we have $$jaco2p=1,$$ since $pequiv 1pmod 8$. At the same time, using
          law of quadratic reciprocity together with $pequiv1pmod4$ we get
          $$jacop_ip=jacopp_i=jaco1p_i=1.$$



          Similarly, we have
          $$jacop_kp=jacopp_k=jaco sp_k=-1.$$






          share|cite|improve this answer












          $endgroup$














          • $begingroup$
            Very pretty. I'd be surprised if there were a proof that didn't use Dirichlet's theorem since quadratic reciprocity really is about those arithmetic progressions. Can you prove that this theorem implies Dirichlet's theorem? Then an alternative proof here would be really interesting.
            $endgroup$
            – Ethan Bolker
            8 hours ago












          Your Answer








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

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

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader:
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/4.0/"u003ecc by-sa 4.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%2f3384177%2fevery-prime-occurs-as-the-least-quadratic-nonresidue%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown


























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          6
















          $begingroup$

          The approach taken in this proof is similar to the proof of Theorem 3 in Section 5.2 of Ireland, Rosen: A Classical Introduction to Modern Number Theory. This theorem states that for every non-square integer $a$ there are infinitely many primes $p$ such that $a$ is a quadratic non-residue modulo $p$.




          $newcommandjaco[2]left(frac#1#2right)$Let $q=p_k$ be the $k$-th prime, we also consider all smaller primes $p_1=2<p_2<dots<p_k-1<p_k$. We want to find $p$ such that
          $$jaco 2p=jacop_2p = dots = jacop_k-1p = 1 qquadtextaqquad jacop_kp=-1. tag*$$
          If there is such $p$, then




          • $p_k$ is a quadratic non-residue modulo $p$;

          • all smaller primes are quadratic residues modulo $p$.

          Since the smallest quadratic non-residue must be prime, we get that $p_k$ the smallest quadratic non-residue modulo $p$.



          To get a prime which fulfills $(*)$, we consider the system of congruences
          beginalign*
          p &equiv 1pmod8\
          p &equiv 1pmodp_2\
          &vdots\
          p &equiv 1pmodp_k-1\
          p &equiv spmodp_k
          endalign*

          where $s$ a is some quadratic non-residue modulo $p_k$.



          First, this system of congruences is equivalent to $pequiv a pmod8p_2cdots p_k$ for some $a$, i.e., the solutions form an arithmetic progression. Moreover, it is easy to see that $gcd(a,8p_2cdots p_k)$, since $a$ fulfills all congruences listed above. So we get from Dirichlet's theorem that there is a prime number $p$ which fulfills this system of congruences.



          For any such prime we have $$jaco2p=1,$$ since $pequiv 1pmod 8$. At the same time, using
          law of quadratic reciprocity together with $pequiv1pmod4$ we get
          $$jacop_ip=jacopp_i=jaco1p_i=1.$$



          Similarly, we have
          $$jacop_kp=jacopp_k=jaco sp_k=-1.$$






          share|cite|improve this answer












          $endgroup$














          • $begingroup$
            Very pretty. I'd be surprised if there were a proof that didn't use Dirichlet's theorem since quadratic reciprocity really is about those arithmetic progressions. Can you prove that this theorem implies Dirichlet's theorem? Then an alternative proof here would be really interesting.
            $endgroup$
            – Ethan Bolker
            8 hours ago















          6
















          $begingroup$

          The approach taken in this proof is similar to the proof of Theorem 3 in Section 5.2 of Ireland, Rosen: A Classical Introduction to Modern Number Theory. This theorem states that for every non-square integer $a$ there are infinitely many primes $p$ such that $a$ is a quadratic non-residue modulo $p$.




          $newcommandjaco[2]left(frac#1#2right)$Let $q=p_k$ be the $k$-th prime, we also consider all smaller primes $p_1=2<p_2<dots<p_k-1<p_k$. We want to find $p$ such that
          $$jaco 2p=jacop_2p = dots = jacop_k-1p = 1 qquadtextaqquad jacop_kp=-1. tag*$$
          If there is such $p$, then




          • $p_k$ is a quadratic non-residue modulo $p$;

          • all smaller primes are quadratic residues modulo $p$.

          Since the smallest quadratic non-residue must be prime, we get that $p_k$ the smallest quadratic non-residue modulo $p$.



          To get a prime which fulfills $(*)$, we consider the system of congruences
          beginalign*
          p &equiv 1pmod8\
          p &equiv 1pmodp_2\
          &vdots\
          p &equiv 1pmodp_k-1\
          p &equiv spmodp_k
          endalign*

          where $s$ a is some quadratic non-residue modulo $p_k$.



          First, this system of congruences is equivalent to $pequiv a pmod8p_2cdots p_k$ for some $a$, i.e., the solutions form an arithmetic progression. Moreover, it is easy to see that $gcd(a,8p_2cdots p_k)$, since $a$ fulfills all congruences listed above. So we get from Dirichlet's theorem that there is a prime number $p$ which fulfills this system of congruences.



          For any such prime we have $$jaco2p=1,$$ since $pequiv 1pmod 8$. At the same time, using
          law of quadratic reciprocity together with $pequiv1pmod4$ we get
          $$jacop_ip=jacopp_i=jaco1p_i=1.$$



          Similarly, we have
          $$jacop_kp=jacopp_k=jaco sp_k=-1.$$






          share|cite|improve this answer












          $endgroup$














          • $begingroup$
            Very pretty. I'd be surprised if there were a proof that didn't use Dirichlet's theorem since quadratic reciprocity really is about those arithmetic progressions. Can you prove that this theorem implies Dirichlet's theorem? Then an alternative proof here would be really interesting.
            $endgroup$
            – Ethan Bolker
            8 hours ago













          6














          6










          6







          $begingroup$

          The approach taken in this proof is similar to the proof of Theorem 3 in Section 5.2 of Ireland, Rosen: A Classical Introduction to Modern Number Theory. This theorem states that for every non-square integer $a$ there are infinitely many primes $p$ such that $a$ is a quadratic non-residue modulo $p$.




          $newcommandjaco[2]left(frac#1#2right)$Let $q=p_k$ be the $k$-th prime, we also consider all smaller primes $p_1=2<p_2<dots<p_k-1<p_k$. We want to find $p$ such that
          $$jaco 2p=jacop_2p = dots = jacop_k-1p = 1 qquadtextaqquad jacop_kp=-1. tag*$$
          If there is such $p$, then




          • $p_k$ is a quadratic non-residue modulo $p$;

          • all smaller primes are quadratic residues modulo $p$.

          Since the smallest quadratic non-residue must be prime, we get that $p_k$ the smallest quadratic non-residue modulo $p$.



          To get a prime which fulfills $(*)$, we consider the system of congruences
          beginalign*
          p &equiv 1pmod8\
          p &equiv 1pmodp_2\
          &vdots\
          p &equiv 1pmodp_k-1\
          p &equiv spmodp_k
          endalign*

          where $s$ a is some quadratic non-residue modulo $p_k$.



          First, this system of congruences is equivalent to $pequiv a pmod8p_2cdots p_k$ for some $a$, i.e., the solutions form an arithmetic progression. Moreover, it is easy to see that $gcd(a,8p_2cdots p_k)$, since $a$ fulfills all congruences listed above. So we get from Dirichlet's theorem that there is a prime number $p$ which fulfills this system of congruences.



          For any such prime we have $$jaco2p=1,$$ since $pequiv 1pmod 8$. At the same time, using
          law of quadratic reciprocity together with $pequiv1pmod4$ we get
          $$jacop_ip=jacopp_i=jaco1p_i=1.$$



          Similarly, we have
          $$jacop_kp=jacopp_k=jaco sp_k=-1.$$






          share|cite|improve this answer












          $endgroup$



          The approach taken in this proof is similar to the proof of Theorem 3 in Section 5.2 of Ireland, Rosen: A Classical Introduction to Modern Number Theory. This theorem states that for every non-square integer $a$ there are infinitely many primes $p$ such that $a$ is a quadratic non-residue modulo $p$.




          $newcommandjaco[2]left(frac#1#2right)$Let $q=p_k$ be the $k$-th prime, we also consider all smaller primes $p_1=2<p_2<dots<p_k-1<p_k$. We want to find $p$ such that
          $$jaco 2p=jacop_2p = dots = jacop_k-1p = 1 qquadtextaqquad jacop_kp=-1. tag*$$
          If there is such $p$, then




          • $p_k$ is a quadratic non-residue modulo $p$;

          • all smaller primes are quadratic residues modulo $p$.

          Since the smallest quadratic non-residue must be prime, we get that $p_k$ the smallest quadratic non-residue modulo $p$.



          To get a prime which fulfills $(*)$, we consider the system of congruences
          beginalign*
          p &equiv 1pmod8\
          p &equiv 1pmodp_2\
          &vdots\
          p &equiv 1pmodp_k-1\
          p &equiv spmodp_k
          endalign*

          where $s$ a is some quadratic non-residue modulo $p_k$.



          First, this system of congruences is equivalent to $pequiv a pmod8p_2cdots p_k$ for some $a$, i.e., the solutions form an arithmetic progression. Moreover, it is easy to see that $gcd(a,8p_2cdots p_k)$, since $a$ fulfills all congruences listed above. So we get from Dirichlet's theorem that there is a prime number $p$ which fulfills this system of congruences.



          For any such prime we have $$jaco2p=1,$$ since $pequiv 1pmod 8$. At the same time, using
          law of quadratic reciprocity together with $pequiv1pmod4$ we get
          $$jacop_ip=jacopp_i=jaco1p_i=1.$$



          Similarly, we have
          $$jacop_kp=jacopp_k=jaco sp_k=-1.$$







          share|cite|improve this answer















          share|cite|improve this answer




          share|cite|improve this answer



          share|cite|improve this answer








          edited 7 hours ago

























          answered 8 hours ago









          Martin SleziakMartin Sleziak

          46.8k11 gold badges131 silver badges286 bronze badges




          46.8k11 gold badges131 silver badges286 bronze badges














          • $begingroup$
            Very pretty. I'd be surprised if there were a proof that didn't use Dirichlet's theorem since quadratic reciprocity really is about those arithmetic progressions. Can you prove that this theorem implies Dirichlet's theorem? Then an alternative proof here would be really interesting.
            $endgroup$
            – Ethan Bolker
            8 hours ago
















          • $begingroup$
            Very pretty. I'd be surprised if there were a proof that didn't use Dirichlet's theorem since quadratic reciprocity really is about those arithmetic progressions. Can you prove that this theorem implies Dirichlet's theorem? Then an alternative proof here would be really interesting.
            $endgroup$
            – Ethan Bolker
            8 hours ago















          $begingroup$
          Very pretty. I'd be surprised if there were a proof that didn't use Dirichlet's theorem since quadratic reciprocity really is about those arithmetic progressions. Can you prove that this theorem implies Dirichlet's theorem? Then an alternative proof here would be really interesting.
          $endgroup$
          – Ethan Bolker
          8 hours ago




          $begingroup$
          Very pretty. I'd be surprised if there were a proof that didn't use Dirichlet's theorem since quadratic reciprocity really is about those arithmetic progressions. Can you prove that this theorem implies Dirichlet's theorem? Then an alternative proof here would be really interesting.
          $endgroup$
          – Ethan Bolker
          8 hours ago


















          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%2f3384177%2fevery-prime-occurs-as-the-least-quadratic-nonresidue%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

          Canceling a color specificationRandomly assigning color to Graphics3D objects?Default color for Filling in Mathematica 9Coloring specific elements of sets with a prime modified order in an array plotHow to pick a color differing significantly from the colors already in a given color list?Detection of the text colorColor numbers based on their valueCan color schemes for use with ColorData include opacity specification?My dynamic color schemes

          Invision Community Contents History See also References External links Navigation menuProprietaryinvisioncommunity.comIPS Community ForumsIPS Community Forumsthis blog entry"License Changes, IP.Board 3.4, and the Future""Interview -- Matt Mecham of Ibforums""CEO Invision Power Board, Matt Mecham Is a Liar, Thief!"IPB License Explanation 1.3, 1.3.1, 2.0, and 2.1ArchivedSecurity Fixes, Updates And Enhancements For IPB 1.3.1Archived"New Demo Accounts - Invision Power Services"the original"New Default Skin"the original"Invision Power Board 3.0.0 and Applications Released"the original"Archived copy"the original"Perpetual licenses being done away with""Release Notes - Invision Power Services""Introducing: IPS Community Suite 4!"Invision Community Release Notes

          François Viète Contents Biography Work and thought Bibliography See also Notes Further reading External links Navigation menup. 21Google Bookspp. 75–77Google BooksDe thou (from University of Saint Andrews)ArchivedGoogle BooksGoogle BooksGoogle BooksGoogle booksGoogle Bookscc-parthenay.frL'histoire universelle (fr)Universal History (en)ArchivedAdsabs.harvard.eduPagesperso-orange.frArchive.orgChikara Sasaki. Descartes' mathematical thought p.259Google BooksGoogle BooksGoogle Bookspp. 152 and onwardGoogle BooksGoogle BooksScribd.comGoogle Books1257-7979Google BooksGoogle BooksGoogle BooksGoogle BooksGoogle BooksGoogle BooksGallica.bnf.frGoogle BooksGoogle Books"François Viète"Francois Viète: Father of Modern Algebraic NotationThe Lawyer and the GamblerAbout TarporleySite de Jean-Paul GuichardL'algèbre nouvelle"About the Harmonicon"cb120511976(data)1188044800000 0001 0913 5903n82164680ola2013766880073431702w6vt1sb70287374827140948071409480