Prove of infinite ways of writing $n$ as $\pm 1^2\pm 2^2\pm....\pm k^2$

68 Views Asked by At

Prove that for each integer $n$, there are infinite ways to represent $n=\pm 1^2\pm 2^2\pm....\pm k^2$ where $k$ is a positive integer and $+,-$ are adjustable

1

There are 1 best solutions below

1
On BEST ANSWER

Lemma 1 : For every $m$ a natural number, we have:

$$ 0 = (m)^2 - (m+1)^2 - (m+2)^2 + (m+3)^2 - (m+4)^2 + (m+5)^2 + (m+6)^2 - (m+7)^2 $$

(The proof of this follows from lemma 2 !)

Lemma 2 : For every natural number $m$ we have :

$$ 4 = (m)^2 - (m+1)^2 - (m+2)^2 + (m+3)^2 $$

Proof: Simple algebra.


At first, suppose $n$ to be an arbitrary natural number for which we have such a representation. By the first lemma it is clear if there exists such a representation, then there exist infinitely many.

Now it suffices to prove the existence of such a representation, and to do so we use induction:

We have such a representation for $n=1, 2, 3$ & $4$. (E.g. $2 = -1 -4 -9 + 16$.)

Now suppose $n$ to be a natural number greater than $4$. We have $m = (m-4) + 4$, and the second lemma implies the assertion.