Can every natural number be written as a sum of signed odd squares

elementary-number-theorynumber theorysequences-and-seriessums-of-squares

Let $c_n \in \{ -1,1\}$. Here, it is stated that every natural number may be written as

$$\sum c_kk^2$$

Where $k$ runs from $1$ to some finite number. I am wondering whether every natural number $n$ can be written as follows:

$$n = \sum c_n(2k-1)^2.$$

In other words,

can every natural number be written as the sum of the first so-and-so signed odd squares?

Obviously, $1=1^2$. However, even to find such a writing of $2$, I needed eight squares:
$$2=1+9+25-49+81-121-169+225$$
And could not find one for $3$. Any insight would be appreciated.

Best Answer

How high do you have to go? $$1=+1^2$$ $$2=+1^2+3^2+5^2-7^2+9^2-11^2-13^2+15^2$$ $$3=+1^2+3^2+5^2+7^2-9^2$$ $$4=-1^2-3^2-5^2-7^2+9^2-11^2-13^2+15^2-17^2+19^2$$ $$5=+1^2+3^2+5^2+7^2-9^2+11^2+13^2+15^2+17^2-19^2-21^2$$ $$6=-1^2-3^2+5^2-7^2-9^2+11^2$$ $$7=+1^2+3^2+5^2+7^2+9^2+11^2+13^2+15^2+17^2-19^2+21^2-23^2-25^2-27^2+29^2$$ $$8=-1^2+3^2$$ $$9=-1^2-3^2+5^2-7^2-9^2-11^2-13^2-15^2-17^2+19^2-21^2-23^2-25^2-27^2+29^2+31^2+33^2$$ $$10=+1^2+3^2$$ $$11=-1^2-3^2+5^2-7^2-9^2-11^2-13^2-15^2+17^2-19^2-21^2+23^2+25^2$$ $$12=-1^2-3^2-5^2-7^2-9^2+11^2-13^2+15^2$$ $$13=-1^2-3^2-5^2-7^2+9^2+11^2-13^2-15^2+17^2$$ $$14=-1^2-3^2-5^2+7^2$$ $$15=-1^2-3^2+5^2$$ $$16=+1^2-3^2-5^2+7^2$$ $$17=+1^2-3^2+5^2$$ $$18=+1^2+3^2-5^2+7^2-9^2+11^2+13^2-15^2$$ $$19=+1^2+3^2+5^2-7^2+9^2+11^2-13^2$$ $$20=-1^2-3^2+5^2-7^2-9^2-11^2-13^2-15^2+17^2+19^2$$ $$21=+1^2+3^2+5^2+7^2+9^2+11^2+13^2-15^2-17^2-19^2+21^2$$ $$22=+1^2-3^2+5^2-7^2-9^2-11^2-13^2-15^2+17^2+19^2$$ $$23=+1^2+3^2+5^2+7^2+9^2+11^2+13^2-15^2+17^2+19^2-21^2+23^2+25^2-27^2-29^2$$ $$24=-1^2+3^2+5^2-7^2-9^2+11^2$$ $$25=-1^2-3^2-5^2-7^2-9^2-11^2+13^2+15^2-17^2-19^2-21^2-23^2-25^2-27^2+29^2+31^2+33^2$$ $$26=+1^2+3^2+5^2-7^2-9^2+11^2$$ $$27=-1^2-3^2-5^2-7^2-9^2-11^2+13^2-15^2+17^2-19^2+21^2$$ $$28=+1^2+3^2+5^2+7^2+9^2-11^2-13^2+15^2+17^2-19^2$$ $$29=+1^2-3^2-5^2-7^2-9^2-11^2+13^2-15^2+17^2-19^2+21^2$$ $$30=-1^2+3^2-5^2-7^2-9^2+11^2-13^2+15^2$$

Related Question