Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Does anyone know of a proof that every positive integer can be represented as $a^2+b^2+ c^2 + c$ where $a$,$b$ and $c$ are nonnegative integers?

I believe that Goldbach asserted this, along with other ways of representing any number, but I can't find a proof.

share|cite|improve this question
Every positif number ? Did you mean integer ? Otherwise take 3.1 and ... – user119228 Feb 4 '14 at 23:18
Any reasonable reader would conclude that the OP meant "whole number" in that context. – Greg Martin Feb 5 '14 at 1:07
I agree with @GregMartin however I feel the answer should indeed include whole number to avoid ambiguity. – Carry on Smiling Feb 5 '14 at 3:28
up vote 7 down vote accepted

Let $N$ be the positive integer that you want to represent as $a^2+b^2+c^2+c$. By the three-squares theorem, $4N+1$ can be written as the sum of three squares, say $4N+1 = x^2+y^2+z^2$. Since all squares are $0$ or $1$ (mod $4$), exactly two of these three squares are even; without loss of generality, suppose $x$ and $y$ are even and $z$ is odd, and write $x=2a$, $y=2b$, and $z=2c+1$. Then $4N+1 = 4a^2 + 4b^2 + 4c^2+4c+1$, which means that $N=a^2+b^2+c^2+c$ as desired.

Of course, the three-squares theorem is not an easy one to prove, but it is standard and classical.

share|cite|improve this answer

there exist a and b satisfying $a^2+b^2+c^2+c=k$ if and only if $k-c^2-c$ has all of its factors of the form $4k+3$ an even number of times.

We need to prove for any natural number k there exists a number c such that $k^2-c^2-c$ that has all of its factors of the form $4k+3$ an even number of times.

share|cite|improve this answer
I suspect this idea is not going to lead to a proof, unfortunately. – Greg Martin Feb 5 '14 at 1:07
Well, I'm not sure it's unfortunate, since you found one, I was just offering my two cents, nice answer by the way. – Carry on Smiling Feb 5 '14 at 3:26

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.