Positive integers have the form $a^2+b^2+c^2+2^d$

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











up vote
5
down vote

favorite












For any positive integer $n$ there seems to be non-negative integers $a,b,c,d$ such that



$$n=a^2+b^2+c^2+2^d.$$



Due to Legendre's three-square theorem a natural number can be represented as the sum of three squares of integers



$$m=a^2+b^2+c^2$$



if and only if $m$ is not of the form $m=4^a(8b+7)$, for integers $a$ and $b$. If the conjecture is true, then for all $ngeq 1$ it must exist a $k$ such that $n-2^k$ is not of the form $m=4^a(8b+7)$.



I want help to prove the conjecture or to find a counter-example.







share|cite|improve this question























    up vote
    5
    down vote

    favorite












    For any positive integer $n$ there seems to be non-negative integers $a,b,c,d$ such that



    $$n=a^2+b^2+c^2+2^d.$$



    Due to Legendre's three-square theorem a natural number can be represented as the sum of three squares of integers



    $$m=a^2+b^2+c^2$$



    if and only if $m$ is not of the form $m=4^a(8b+7)$, for integers $a$ and $b$. If the conjecture is true, then for all $ngeq 1$ it must exist a $k$ such that $n-2^k$ is not of the form $m=4^a(8b+7)$.



    I want help to prove the conjecture or to find a counter-example.







    share|cite|improve this question





















      up vote
      5
      down vote

      favorite









      up vote
      5
      down vote

      favorite











      For any positive integer $n$ there seems to be non-negative integers $a,b,c,d$ such that



      $$n=a^2+b^2+c^2+2^d.$$



      Due to Legendre's three-square theorem a natural number can be represented as the sum of three squares of integers



      $$m=a^2+b^2+c^2$$



      if and only if $m$ is not of the form $m=4^a(8b+7)$, for integers $a$ and $b$. If the conjecture is true, then for all $ngeq 1$ it must exist a $k$ such that $n-2^k$ is not of the form $m=4^a(8b+7)$.



      I want help to prove the conjecture or to find a counter-example.







      share|cite|improve this question











      For any positive integer $n$ there seems to be non-negative integers $a,b,c,d$ such that



      $$n=a^2+b^2+c^2+2^d.$$



      Due to Legendre's three-square theorem a natural number can be represented as the sum of three squares of integers



      $$m=a^2+b^2+c^2$$



      if and only if $m$ is not of the form $m=4^a(8b+7)$, for integers $a$ and $b$. If the conjecture is true, then for all $ngeq 1$ it must exist a $k$ such that $n-2^k$ is not of the form $m=4^a(8b+7)$.



      I want help to prove the conjecture or to find a counter-example.









      share|cite|improve this question










      share|cite|improve this question




      share|cite|improve this question









      asked 10 hours ago









      Lehs

      6,77731459




      6,77731459




















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          6
          down vote



          accepted










          We claim that $n$ can be written as $a^2+b^2+c^2+x$ where $xin1,2,4$. Indeed, otherwise, we must have that



          $$n-1,n-2,n-4$$



          are each of the form $4^a(8b+7)$. However, all such numbers are either $equiv 0$ or $equiv 3bmod 4$, while $n-1,n-2,n-4$ are each members of different residues $bmod 4$. So, it only remains to prove this in the case for which these are not all positive integers, namely $nleq 4$. We have



          $$0^2+0^2+0^2+2^0=1$$



          $$0^2+0^2+0^2+2^1=2$$



          $$0^2+0^2+1^2+2^1=3$$



          $$0^2+0^2+0^2+2^2=4.$$






          share|cite|improve this answer





















          • or ≡3mod4, while n−1,n−2,n−4 are each members of different residues: How do you know that $a^2+b^2+c^2$ can only be $1$ or $2$ ?
            – Diger
            9 hours ago











          • A nice theorem!
            – Lehs
            9 hours ago










          • U talking to me?
            – Diger
            8 hours ago










          • @Diger $a^2+b^2+c^2$ can be equivalent to $0$ or $3bmod 4$, but using the result that Lehs states in the question, we know the only numbers not representable in that form are those of the form $4^x(8y+7)$ for some nonnegative integers $x,y$. All such numbers are either equivalent to $0$ or $3bmod 4$, so $a^2+b^2+c^2$ reaches all numbers equivalent to $1$ or $2bmod 4$. At least one of $(n-1,n-2,n-4)$ is of this form.
            – Carl Schildkraut
            8 hours ago










          • At least one of (n−1,n−2,n−4) is of this form ?? I thought all?
            – Diger
            7 hours ago










          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%2f2873204%2fpositive-integers-have-the-form-a2b2c22d%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
          6
          down vote



          accepted










          We claim that $n$ can be written as $a^2+b^2+c^2+x$ where $xin1,2,4$. Indeed, otherwise, we must have that



          $$n-1,n-2,n-4$$



          are each of the form $4^a(8b+7)$. However, all such numbers are either $equiv 0$ or $equiv 3bmod 4$, while $n-1,n-2,n-4$ are each members of different residues $bmod 4$. So, it only remains to prove this in the case for which these are not all positive integers, namely $nleq 4$. We have



          $$0^2+0^2+0^2+2^0=1$$



          $$0^2+0^2+0^2+2^1=2$$



          $$0^2+0^2+1^2+2^1=3$$



          $$0^2+0^2+0^2+2^2=4.$$






          share|cite|improve this answer





















          • or ≡3mod4, while n−1,n−2,n−4 are each members of different residues: How do you know that $a^2+b^2+c^2$ can only be $1$ or $2$ ?
            – Diger
            9 hours ago











          • A nice theorem!
            – Lehs
            9 hours ago










          • U talking to me?
            – Diger
            8 hours ago










          • @Diger $a^2+b^2+c^2$ can be equivalent to $0$ or $3bmod 4$, but using the result that Lehs states in the question, we know the only numbers not representable in that form are those of the form $4^x(8y+7)$ for some nonnegative integers $x,y$. All such numbers are either equivalent to $0$ or $3bmod 4$, so $a^2+b^2+c^2$ reaches all numbers equivalent to $1$ or $2bmod 4$. At least one of $(n-1,n-2,n-4)$ is of this form.
            – Carl Schildkraut
            8 hours ago










          • At least one of (n−1,n−2,n−4) is of this form ?? I thought all?
            – Diger
            7 hours ago














          up vote
          6
          down vote



          accepted










          We claim that $n$ can be written as $a^2+b^2+c^2+x$ where $xin1,2,4$. Indeed, otherwise, we must have that



          $$n-1,n-2,n-4$$



          are each of the form $4^a(8b+7)$. However, all such numbers are either $equiv 0$ or $equiv 3bmod 4$, while $n-1,n-2,n-4$ are each members of different residues $bmod 4$. So, it only remains to prove this in the case for which these are not all positive integers, namely $nleq 4$. We have



          $$0^2+0^2+0^2+2^0=1$$



          $$0^2+0^2+0^2+2^1=2$$



          $$0^2+0^2+1^2+2^1=3$$



          $$0^2+0^2+0^2+2^2=4.$$






          share|cite|improve this answer





















          • or ≡3mod4, while n−1,n−2,n−4 are each members of different residues: How do you know that $a^2+b^2+c^2$ can only be $1$ or $2$ ?
            – Diger
            9 hours ago











          • A nice theorem!
            – Lehs
            9 hours ago










          • U talking to me?
            – Diger
            8 hours ago










          • @Diger $a^2+b^2+c^2$ can be equivalent to $0$ or $3bmod 4$, but using the result that Lehs states in the question, we know the only numbers not representable in that form are those of the form $4^x(8y+7)$ for some nonnegative integers $x,y$. All such numbers are either equivalent to $0$ or $3bmod 4$, so $a^2+b^2+c^2$ reaches all numbers equivalent to $1$ or $2bmod 4$. At least one of $(n-1,n-2,n-4)$ is of this form.
            – Carl Schildkraut
            8 hours ago










          • At least one of (n−1,n−2,n−4) is of this form ?? I thought all?
            – Diger
            7 hours ago












          up vote
          6
          down vote



          accepted







          up vote
          6
          down vote



          accepted






          We claim that $n$ can be written as $a^2+b^2+c^2+x$ where $xin1,2,4$. Indeed, otherwise, we must have that



          $$n-1,n-2,n-4$$



          are each of the form $4^a(8b+7)$. However, all such numbers are either $equiv 0$ or $equiv 3bmod 4$, while $n-1,n-2,n-4$ are each members of different residues $bmod 4$. So, it only remains to prove this in the case for which these are not all positive integers, namely $nleq 4$. We have



          $$0^2+0^2+0^2+2^0=1$$



          $$0^2+0^2+0^2+2^1=2$$



          $$0^2+0^2+1^2+2^1=3$$



          $$0^2+0^2+0^2+2^2=4.$$






          share|cite|improve this answer













          We claim that $n$ can be written as $a^2+b^2+c^2+x$ where $xin1,2,4$. Indeed, otherwise, we must have that



          $$n-1,n-2,n-4$$



          are each of the form $4^a(8b+7)$. However, all such numbers are either $equiv 0$ or $equiv 3bmod 4$, while $n-1,n-2,n-4$ are each members of different residues $bmod 4$. So, it only remains to prove this in the case for which these are not all positive integers, namely $nleq 4$. We have



          $$0^2+0^2+0^2+2^0=1$$



          $$0^2+0^2+0^2+2^1=2$$



          $$0^2+0^2+1^2+2^1=3$$



          $$0^2+0^2+0^2+2^2=4.$$







          share|cite|improve this answer













          share|cite|improve this answer



          share|cite|improve this answer











          answered 10 hours ago









          Carl Schildkraut

          8,23711138




          8,23711138











          • or ≡3mod4, while n−1,n−2,n−4 are each members of different residues: How do you know that $a^2+b^2+c^2$ can only be $1$ or $2$ ?
            – Diger
            9 hours ago











          • A nice theorem!
            – Lehs
            9 hours ago










          • U talking to me?
            – Diger
            8 hours ago










          • @Diger $a^2+b^2+c^2$ can be equivalent to $0$ or $3bmod 4$, but using the result that Lehs states in the question, we know the only numbers not representable in that form are those of the form $4^x(8y+7)$ for some nonnegative integers $x,y$. All such numbers are either equivalent to $0$ or $3bmod 4$, so $a^2+b^2+c^2$ reaches all numbers equivalent to $1$ or $2bmod 4$. At least one of $(n-1,n-2,n-4)$ is of this form.
            – Carl Schildkraut
            8 hours ago










          • At least one of (n−1,n−2,n−4) is of this form ?? I thought all?
            – Diger
            7 hours ago
















          • or ≡3mod4, while n−1,n−2,n−4 are each members of different residues: How do you know that $a^2+b^2+c^2$ can only be $1$ or $2$ ?
            – Diger
            9 hours ago











          • A nice theorem!
            – Lehs
            9 hours ago










          • U talking to me?
            – Diger
            8 hours ago










          • @Diger $a^2+b^2+c^2$ can be equivalent to $0$ or $3bmod 4$, but using the result that Lehs states in the question, we know the only numbers not representable in that form are those of the form $4^x(8y+7)$ for some nonnegative integers $x,y$. All such numbers are either equivalent to $0$ or $3bmod 4$, so $a^2+b^2+c^2$ reaches all numbers equivalent to $1$ or $2bmod 4$. At least one of $(n-1,n-2,n-4)$ is of this form.
            – Carl Schildkraut
            8 hours ago










          • At least one of (n−1,n−2,n−4) is of this form ?? I thought all?
            – Diger
            7 hours ago















          or ≡3mod4, while n−1,n−2,n−4 are each members of different residues: How do you know that $a^2+b^2+c^2$ can only be $1$ or $2$ ?
          – Diger
          9 hours ago





          or ≡3mod4, while n−1,n−2,n−4 are each members of different residues: How do you know that $a^2+b^2+c^2$ can only be $1$ or $2$ ?
          – Diger
          9 hours ago













          A nice theorem!
          – Lehs
          9 hours ago




          A nice theorem!
          – Lehs
          9 hours ago












          U talking to me?
          – Diger
          8 hours ago




          U talking to me?
          – Diger
          8 hours ago












          @Diger $a^2+b^2+c^2$ can be equivalent to $0$ or $3bmod 4$, but using the result that Lehs states in the question, we know the only numbers not representable in that form are those of the form $4^x(8y+7)$ for some nonnegative integers $x,y$. All such numbers are either equivalent to $0$ or $3bmod 4$, so $a^2+b^2+c^2$ reaches all numbers equivalent to $1$ or $2bmod 4$. At least one of $(n-1,n-2,n-4)$ is of this form.
          – Carl Schildkraut
          8 hours ago




          @Diger $a^2+b^2+c^2$ can be equivalent to $0$ or $3bmod 4$, but using the result that Lehs states in the question, we know the only numbers not representable in that form are those of the form $4^x(8y+7)$ for some nonnegative integers $x,y$. All such numbers are either equivalent to $0$ or $3bmod 4$, so $a^2+b^2+c^2$ reaches all numbers equivalent to $1$ or $2bmod 4$. At least one of $(n-1,n-2,n-4)$ is of this form.
          – Carl Schildkraut
          8 hours ago












          At least one of (n−1,n−2,n−4) is of this form ?? I thought all?
          – Diger
          7 hours ago




          At least one of (n−1,n−2,n−4) is of this form ?? I thought all?
          – Diger
          7 hours ago












           

          draft saved


          draft discarded


























           


          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f2873204%2fpositive-integers-have-the-form-a2b2c22d%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?