Finding all possible remainders of perfect squares mod $n$, $nin mathbbZ_+$

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
3
down vote

favorite
1












Is there a way to generalize what remainders of perfect squares to expect for different bases. for $a^2equiv 0,1 text mod 3$. but what about $a^2equiv r text mod n in mathbbZ_+$. For e.g if I want to know all the possible remainders $r$ for $a^2$ mod $117$, then will it still have $0,1$, if not, then how can I find all the remainders?



Edit
Well clearly for the e.g I provided we'd have all $a^2leq 117$ in $r$, but I guess the question was whether or not the $r$ that appear in base $5$ will also appear in base $22$, and the $r$ in base $q$ will also appear in base $k$, s.t $q<k$



Thanks







share|cite|improve this question

















  • 1




    en.wikipedia.org/wiki/Quadratic_residue
    – Mason
    Jul 14 at 21:23










  • For $n$ prime, it is always half of the non-zero remainders, and you can use quadratic reciprocity to check any particular $r$.
    – Thomas Andrews
    Jul 14 at 21:23










  • $0$ and $1$ will always be residues of perfect squares to any modulus, but there will generally be others.
    – Joffan
    Jul 14 at 23:14














up vote
3
down vote

favorite
1












Is there a way to generalize what remainders of perfect squares to expect for different bases. for $a^2equiv 0,1 text mod 3$. but what about $a^2equiv r text mod n in mathbbZ_+$. For e.g if I want to know all the possible remainders $r$ for $a^2$ mod $117$, then will it still have $0,1$, if not, then how can I find all the remainders?



Edit
Well clearly for the e.g I provided we'd have all $a^2leq 117$ in $r$, but I guess the question was whether or not the $r$ that appear in base $5$ will also appear in base $22$, and the $r$ in base $q$ will also appear in base $k$, s.t $q<k$



Thanks







share|cite|improve this question

















  • 1




    en.wikipedia.org/wiki/Quadratic_residue
    – Mason
    Jul 14 at 21:23










  • For $n$ prime, it is always half of the non-zero remainders, and you can use quadratic reciprocity to check any particular $r$.
    – Thomas Andrews
    Jul 14 at 21:23










  • $0$ and $1$ will always be residues of perfect squares to any modulus, but there will generally be others.
    – Joffan
    Jul 14 at 23:14












up vote
3
down vote

favorite
1









up vote
3
down vote

favorite
1






1





Is there a way to generalize what remainders of perfect squares to expect for different bases. for $a^2equiv 0,1 text mod 3$. but what about $a^2equiv r text mod n in mathbbZ_+$. For e.g if I want to know all the possible remainders $r$ for $a^2$ mod $117$, then will it still have $0,1$, if not, then how can I find all the remainders?



Edit
Well clearly for the e.g I provided we'd have all $a^2leq 117$ in $r$, but I guess the question was whether or not the $r$ that appear in base $5$ will also appear in base $22$, and the $r$ in base $q$ will also appear in base $k$, s.t $q<k$



Thanks







share|cite|improve this question













Is there a way to generalize what remainders of perfect squares to expect for different bases. for $a^2equiv 0,1 text mod 3$. but what about $a^2equiv r text mod n in mathbbZ_+$. For e.g if I want to know all the possible remainders $r$ for $a^2$ mod $117$, then will it still have $0,1$, if not, then how can I find all the remainders?



Edit
Well clearly for the e.g I provided we'd have all $a^2leq 117$ in $r$, but I guess the question was whether or not the $r$ that appear in base $5$ will also appear in base $22$, and the $r$ in base $q$ will also appear in base $k$, s.t $q<k$



Thanks









share|cite|improve this question












share|cite|improve this question




share|cite|improve this question








edited Jul 14 at 23:26
























asked Jul 14 at 21:14









john fowles

1,093817




1,093817







  • 1




    en.wikipedia.org/wiki/Quadratic_residue
    – Mason
    Jul 14 at 21:23










  • For $n$ prime, it is always half of the non-zero remainders, and you can use quadratic reciprocity to check any particular $r$.
    – Thomas Andrews
    Jul 14 at 21:23










  • $0$ and $1$ will always be residues of perfect squares to any modulus, but there will generally be others.
    – Joffan
    Jul 14 at 23:14












  • 1




    en.wikipedia.org/wiki/Quadratic_residue
    – Mason
    Jul 14 at 21:23










  • For $n$ prime, it is always half of the non-zero remainders, and you can use quadratic reciprocity to check any particular $r$.
    – Thomas Andrews
    Jul 14 at 21:23










  • $0$ and $1$ will always be residues of perfect squares to any modulus, but there will generally be others.
    – Joffan
    Jul 14 at 23:14







1




1




en.wikipedia.org/wiki/Quadratic_residue
– Mason
Jul 14 at 21:23




en.wikipedia.org/wiki/Quadratic_residue
– Mason
Jul 14 at 21:23












For $n$ prime, it is always half of the non-zero remainders, and you can use quadratic reciprocity to check any particular $r$.
– Thomas Andrews
Jul 14 at 21:23




For $n$ prime, it is always half of the non-zero remainders, and you can use quadratic reciprocity to check any particular $r$.
– Thomas Andrews
Jul 14 at 21:23












$0$ and $1$ will always be residues of perfect squares to any modulus, but there will generally be others.
– Joffan
Jul 14 at 23:14




$0$ and $1$ will always be residues of perfect squares to any modulus, but there will generally be others.
– Joffan
Jul 14 at 23:14










1 Answer
1






active

oldest

votes

















up vote
3
down vote



accepted










Yes, there's some machinery you can use to figure out if $r$ is a remainder of a perfect square mod $n$. These $r$'s are called quadratic residues, and the main technique at play to see if $r$ is a quadratic residue is quadratic reciprocity and properties of Legendre symbols.






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',
    convertImagesToLinks: true,
    noModals: false,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    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%2f2851968%2ffinding-all-possible-remainders-of-perfect-squares-mod-n-n-in-mathbbz%23new-answer', 'question_page');

    );

    Post as a guest






























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes








    up vote
    3
    down vote



    accepted










    Yes, there's some machinery you can use to figure out if $r$ is a remainder of a perfect square mod $n$. These $r$'s are called quadratic residues, and the main technique at play to see if $r$ is a quadratic residue is quadratic reciprocity and properties of Legendre symbols.






    share|cite|improve this answer

























      up vote
      3
      down vote



      accepted










      Yes, there's some machinery you can use to figure out if $r$ is a remainder of a perfect square mod $n$. These $r$'s are called quadratic residues, and the main technique at play to see if $r$ is a quadratic residue is quadratic reciprocity and properties of Legendre symbols.






      share|cite|improve this answer























        up vote
        3
        down vote



        accepted







        up vote
        3
        down vote



        accepted






        Yes, there's some machinery you can use to figure out if $r$ is a remainder of a perfect square mod $n$. These $r$'s are called quadratic residues, and the main technique at play to see if $r$ is a quadratic residue is quadratic reciprocity and properties of Legendre symbols.






        share|cite|improve this answer













        Yes, there's some machinery you can use to figure out if $r$ is a remainder of a perfect square mod $n$. These $r$'s are called quadratic residues, and the main technique at play to see if $r$ is a quadratic residue is quadratic reciprocity and properties of Legendre symbols.







        share|cite|improve this answer













        share|cite|improve this answer



        share|cite|improve this answer











        answered Jul 14 at 21:23









        Marcus M

        8,1731847




        8,1731847






















             

            draft saved


            draft discarded


























             


            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f2851968%2ffinding-all-possible-remainders-of-perfect-squares-mod-n-n-in-mathbbz%23new-answer', 'question_page');

            );

            Post as a guest













































































            Comments

            Popular posts from this blog

            Color the edges and diagonals of a regular polygon

            Relationship between determinant of matrix and determinant of adjoint?

            What is the equation of a 3D cone with generalised tilt?