$n$ or $2n$ is a sum of three squares











up vote
0
down vote

favorite













For a given positive integer $n$, show that $n$ or $2n$ is a sum of
three squares.




My attempt: If $n$ is a sum of three squares, there is nothing to prove. So assume $n$ is not a sum of three squares. Then $$nequiv7pmod8implies 2nequiv6pmod8$$. I'm completely stuck here. I know that no positive integer of the form $4^a(8b+7)$ can be written as sum of three squares. My textbook (Elementary Number Theory- David Burton)doesn't give the proof of the converse of the statement,but mentions that the converse is true. The question is from the same book. So are we supposed to use the full theorem?(Alex has already given a proof using the converse.) Is there any way to proceed without using the converse of the theorem? Thanks.










share|cite|improve this question




















  • 1




    Could you please recall exactly what you know regarding sum of three squares. It seems you might know Legendre's three-squares theorem, but you do not recall it correctly.
    – quid
    Oct 15 at 17:29












  • In general, it is a good practice to provide a little context for the questions you post: this helps other members help you by giving perhaps the answer you are searching for.
    – Daniele Tampieri
    Oct 15 at 17:37















up vote
0
down vote

favorite













For a given positive integer $n$, show that $n$ or $2n$ is a sum of
three squares.




My attempt: If $n$ is a sum of three squares, there is nothing to prove. So assume $n$ is not a sum of three squares. Then $$nequiv7pmod8implies 2nequiv6pmod8$$. I'm completely stuck here. I know that no positive integer of the form $4^a(8b+7)$ can be written as sum of three squares. My textbook (Elementary Number Theory- David Burton)doesn't give the proof of the converse of the statement,but mentions that the converse is true. The question is from the same book. So are we supposed to use the full theorem?(Alex has already given a proof using the converse.) Is there any way to proceed without using the converse of the theorem? Thanks.










share|cite|improve this question




















  • 1




    Could you please recall exactly what you know regarding sum of three squares. It seems you might know Legendre's three-squares theorem, but you do not recall it correctly.
    – quid
    Oct 15 at 17:29












  • In general, it is a good practice to provide a little context for the questions you post: this helps other members help you by giving perhaps the answer you are searching for.
    – Daniele Tampieri
    Oct 15 at 17:37













up vote
0
down vote

favorite









up vote
0
down vote

favorite












For a given positive integer $n$, show that $n$ or $2n$ is a sum of
three squares.




My attempt: If $n$ is a sum of three squares, there is nothing to prove. So assume $n$ is not a sum of three squares. Then $$nequiv7pmod8implies 2nequiv6pmod8$$. I'm completely stuck here. I know that no positive integer of the form $4^a(8b+7)$ can be written as sum of three squares. My textbook (Elementary Number Theory- David Burton)doesn't give the proof of the converse of the statement,but mentions that the converse is true. The question is from the same book. So are we supposed to use the full theorem?(Alex has already given a proof using the converse.) Is there any way to proceed without using the converse of the theorem? Thanks.










share|cite|improve this question
















For a given positive integer $n$, show that $n$ or $2n$ is a sum of
three squares.




My attempt: If $n$ is a sum of three squares, there is nothing to prove. So assume $n$ is not a sum of three squares. Then $$nequiv7pmod8implies 2nequiv6pmod8$$. I'm completely stuck here. I know that no positive integer of the form $4^a(8b+7)$ can be written as sum of three squares. My textbook (Elementary Number Theory- David Burton)doesn't give the proof of the converse of the statement,but mentions that the converse is true. The question is from the same book. So are we supposed to use the full theorem?(Alex has already given a proof using the converse.) Is there any way to proceed without using the converse of the theorem? Thanks.







number-theory elementary-number-theory






share|cite|improve this question















share|cite|improve this question













share|cite|improve this question




share|cite|improve this question








edited Nov 22 at 9:21

























asked Oct 15 at 17:25









Thomas Shelby

1,170116




1,170116








  • 1




    Could you please recall exactly what you know regarding sum of three squares. It seems you might know Legendre's three-squares theorem, but you do not recall it correctly.
    – quid
    Oct 15 at 17:29












  • In general, it is a good practice to provide a little context for the questions you post: this helps other members help you by giving perhaps the answer you are searching for.
    – Daniele Tampieri
    Oct 15 at 17:37














  • 1




    Could you please recall exactly what you know regarding sum of three squares. It seems you might know Legendre's three-squares theorem, but you do not recall it correctly.
    – quid
    Oct 15 at 17:29












  • In general, it is a good practice to provide a little context for the questions you post: this helps other members help you by giving perhaps the answer you are searching for.
    – Daniele Tampieri
    Oct 15 at 17:37








1




1




Could you please recall exactly what you know regarding sum of three squares. It seems you might know Legendre's three-squares theorem, but you do not recall it correctly.
– quid
Oct 15 at 17:29






Could you please recall exactly what you know regarding sum of three squares. It seems you might know Legendre's three-squares theorem, but you do not recall it correctly.
– quid
Oct 15 at 17:29














In general, it is a good practice to provide a little context for the questions you post: this helps other members help you by giving perhaps the answer you are searching for.
– Daniele Tampieri
Oct 15 at 17:37




In general, it is a good practice to provide a little context for the questions you post: this helps other members help you by giving perhaps the answer you are searching for.
– Daniele Tampieri
Oct 15 at 17:37










1 Answer
1






active

oldest

votes

















up vote
3
down vote



accepted










So $x$ is the sum of three squares iff $x$ is not of the form $4^a(8b+7)$ via Legendre's theorem. Suppose $n$ is not the sum of three squares, so that $x=4^a(8b+7)$ for some integers $a,b$. Then $2x=2cdot 4^a(8b+7)$. Notice that $8b+7$ is always odd. So it's not possible that $2x=4^c(8d+7)$, as $c=a$ necessarily, e.g. $2cdot 4^a=4^c$ is impossible.






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: 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%2f2956816%2fn-or-2n-is-a-sum-of-three-squares%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








    up vote
    3
    down vote



    accepted










    So $x$ is the sum of three squares iff $x$ is not of the form $4^a(8b+7)$ via Legendre's theorem. Suppose $n$ is not the sum of three squares, so that $x=4^a(8b+7)$ for some integers $a,b$. Then $2x=2cdot 4^a(8b+7)$. Notice that $8b+7$ is always odd. So it's not possible that $2x=4^c(8d+7)$, as $c=a$ necessarily, e.g. $2cdot 4^a=4^c$ is impossible.






    share|cite|improve this answer



























      up vote
      3
      down vote



      accepted










      So $x$ is the sum of three squares iff $x$ is not of the form $4^a(8b+7)$ via Legendre's theorem. Suppose $n$ is not the sum of three squares, so that $x=4^a(8b+7)$ for some integers $a,b$. Then $2x=2cdot 4^a(8b+7)$. Notice that $8b+7$ is always odd. So it's not possible that $2x=4^c(8d+7)$, as $c=a$ necessarily, e.g. $2cdot 4^a=4^c$ is impossible.






      share|cite|improve this answer

























        up vote
        3
        down vote



        accepted







        up vote
        3
        down vote



        accepted






        So $x$ is the sum of three squares iff $x$ is not of the form $4^a(8b+7)$ via Legendre's theorem. Suppose $n$ is not the sum of three squares, so that $x=4^a(8b+7)$ for some integers $a,b$. Then $2x=2cdot 4^a(8b+7)$. Notice that $8b+7$ is always odd. So it's not possible that $2x=4^c(8d+7)$, as $c=a$ necessarily, e.g. $2cdot 4^a=4^c$ is impossible.






        share|cite|improve this answer














        So $x$ is the sum of three squares iff $x$ is not of the form $4^a(8b+7)$ via Legendre's theorem. Suppose $n$ is not the sum of three squares, so that $x=4^a(8b+7)$ for some integers $a,b$. Then $2x=2cdot 4^a(8b+7)$. Notice that $8b+7$ is always odd. So it's not possible that $2x=4^c(8d+7)$, as $c=a$ necessarily, e.g. $2cdot 4^a=4^c$ is impossible.







        share|cite|improve this answer














        share|cite|improve this answer



        share|cite|improve this answer








        edited Nov 22 at 20:08

























        answered Oct 15 at 17:38









        Alex R.

        24.7k12352




        24.7k12352






























            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%2f2956816%2fn-or-2n-is-a-sum-of-three-squares%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

            Quarter-circle Tiles

            build a pushdown automaton that recognizes the reverse language of a given pushdown automaton?

            Mont Emei