# Relationship between the squares of first n natural numbers and first n natural odd numbers.

Here's a question from high school mathematics.

If $$1^2 + 2^2 + 3^2 + 4^2 + 5^2 + \dots + 100^2 = x$$, then ($$1^2 + 3^2 + 5^2 + \dots + 99^2$$) is equal to ?

Options were:

(a) $$\frac{x}{2}-2525$$

(b) $$\frac{x}{2}+5050$$

(c) $$\frac{x}{2}-5050$$

(d) $$\frac{x}{2}+2525$$

Is there a way to solve this question without using the formula for the summation of the squares of the first $$n$$ natural numbers. I am definitely sure there's an easy way to do this without using the formula - $$\frac{n(n+1)(2n+1)}{6}$$ or those other summation formula for summing up the first $$n$$ odd/even natural numbers.

The correct answer is (a). I was able to solve(wrong) it by using the formula for the sum of square of first n natural numbers that I found online. Here's my solution using those formulas: $$x = \frac{n(n+1)(2n+1)}{6}$$ $$x = {100 * 101 * 201 \over 6} = 338350$$ $${x\over 2} = {338350\over2}$$ $${x\over 2} = 169175$$ $$e = 2^2 + 4^2 + 6^2 + 8^2 + 10^2 + \dots + 100^2$$ $$e = {2n(n+1)(2n+1)\over3}$$ $$e = {2*100(101)(201)\over3}$$ $$e = 166650$$ $${x\over2} - e = {x\over2} - e$$ $${x\over2} - e = 169175-166650$$ $${x\over2} - e = 2525$$ $${x\over2} - 2525 = e$$ We know that sum of square of n natural numbers - sum of square of n natural even numbers = sum of square of n natural odd numbers. $$x - ({x\over2} - 2525) = 1^2 + 3^2 + 5^2 + 7^2 + 9^2 + \dots + 99^2$$ $${x\over2} + 2525 = 1^2 + 3^2 + 5^2 + 7^2 + 9^2 + \dots + 99^2$$

But the correct answer should be $${x\over2}-2525$$

• $2^2+4^2+\cdots+100^2=2^2+2^2\cdot 2^2+\cdots+2^2\cdot 50^2=2^2(1^2+2^2+\cdots+50^2)$. Here you can use the formula for the sum of squares and get a straightforward solution. Apr 1 at 14:24
• The key to a simple solution is to know/realize that all consecutive squares are separated by an odd number, and particularly that the series of odd numbers beginning with 1 is also the series of the differences between consecutive square numbers (beginning with 1-squared minus 0-squared). Apr 1 at 14:51
• The question text does not match the subject line. In your example you compare the first hundred squares with the first fifty odd squares. Apr 3 at 10:26
• still there's a question left to be answered. what is ${x\over2}+2525$ that I created out of no where?? Although, the solution is not even acceptable because I cheated some formulas from internet, I wonder what is the mistake in my solution. Apr 3 at 16:32

Let $$A=\sum_{k=1}^{50} (2k-1)^2$$, and $$B=\sum_{k=1}^{50} (2k)^2$$. Then, $$A$$ is the answer you want and $$A+B=x$$.

What is $$B-A$$? Well, We can group that in pairs to get $$B-A=(2^2-1^2)+\cdots (100^2-99^2)$$ which is $$(2+1)(2-1)+(4+3)(4-3)+\cdots +(100+99)(100-99)=$$ $$=3+7+11+\cdots +199=\frac {50}2\times (3+199) =5050$$

To conclude: adding the two equations, $$A+B=x$$ and $$A-B=-5050$$ we get $$2A=x-5050\implies A=\frac x2-2025$$

• Nice strategy. I like the arithmetic progression at the end. Apr 1 at 15:08
• You can also observe that $3 + 7 + \cdots + 199 = 1 + 2 + 3 + 4 + \cdots + 99 + 100$ and recall that this is a particularly famous sum. Apr 2 at 14:56
• @Ishant I saw, from the edit queue, that you wanted to add details of the computation, so I've done that. I thought that my way of concluding was (slightly) simpler though of course your method works as well.
– lulu
Apr 3 at 16:14
• @DavidK You don't even need to observe it from the collapsed form; when you separate the differences of squares, the first term in each product is 2k-1 + 2k, and the second term in each product is always 1, That means the whole thing is the sum from k=1 to 50 of (2k-1 + 2k), which is just the sum from n=1 to 100 of n. I imagine that specific observation was probably the intention? Apr 4 at 14:13
• @Idran True, I could have pointed to the line just before $3+7+\cdots$, where the factorization is shown explicitly. What I remembered was that the difference of two consecutive squares is the sum of two consecutive integers. Apr 4 at 16:00

There is a way to do this without writing any "Sigmas" or calculating the correct result from first principles (or the formula for the sum of squares), but it relies on the question being multiple choice.

First note that the sum of odd squares must be less than half of the sum of all squares, since from each consecutive pair (e.g. $$33^2 + 34^2$$) the sum of odd squares only includes the smaller one of the pair. This immediately rules out the two options which are greater than $$x / 2$$.

To choose between the remaining two options, consider just whether the numbers involved are odd or even.

• To find the parity of $$x / 2$$, we need to find $$x$$ modulo 4. This is fairly easy: there are fifty even squares which are zero modulo 4, and fifty odd squares which are 1 modulo 4. Since $$50 \times 0 + 50 \times 1 \equiv 2 \mod{4}$$, we know that $$x / 2$$ is odd.
• The sum of odd squares is even, since it is a sum of 50 odd numbers.

Since $$x / 2$$ is odd, $$x/2 - 5050$$ is also odd. By process of elimination, the correct option must be $$x/2 - 2525$$.

• now that's natty Apr 2 at 13:24

Let $$t=1^2+3^2+\dots+99^2$$. Then $$x-t=2^2+4^2+\dots+100^2=\sum_{i=1}^{50}(2k)^2.$$

Adding and subtracting the one leads to: $$\sum_{i=1}^{50}(2k)^2 = \sum_{i=1}^{50}((2k-1)+1)^2 = \sum_{i=1}^{50}((2k-1)^2+2(2k-1)+1) = t + 50 + 2\sum_{i=1}^{50}(2k-1).$$

The last sum is easily calculated by proper ordering of summands: $$\underbrace{(1+99) + (3+97) + \dots + (49+51)}_\text{25 items, all equal to 100} =25 \cdot 100 = 2500$$

The rest is fairly simple: find $$t$$ from $$x=2t+5050$$.

Another way of solve this problem without $$\dfrac{n(n+1)(2n+1)}{6}$$. It is a bit long but different from the others presented and that is why I consider it relevant.

Let $$B=1^2 + 3^2 + 5^2 + \dots + 99^2$$. It is clear that

►If $$\dfrac x2\equiv2\pmod3$$ and $$B\equiv0\pmod3$$ then $$B=\dfrac x2-2525\equiv0\pmod3$$ and $$B=\dfrac x2+5050\equiv0\pmod{3}$$ the other two values $$2525$$ and $$-5050$$ yields to the contradiction $$B \equiv1\pmod3$$. We need to discard the value $$5050$$.

►►If $$\dfrac x2\equiv5\pmod{10}$$ and $$B\equiv0\pmod{10}$$ then $$B=\dfrac x2+5050\equiv5\pmod{10}$$, contradiction.

$$\underline {\text {Proof of } \space \dfrac x2\equiv2\pmod3\text{ and } B\equiv0\pmod3}$$

We have that $$x=1+2^2+3^2+\cdots+98^2+99^2+100^2$$ has $$100$$ terms of which there are $$33$$ multiples of $$3$$ so $$100-33=67$$ terms non multiples of $$3$$ the square of each of them being equal to $$1$$ modulo $$3$$. It follows that $$x\equiv 0+67\equiv1\pmod3$$ so $$x=3m+1$$ and $$\boxed{\dfrac x2=\dfrac{3(2n+1)+1}{2}=\dfrac{6n+4}{2}=3n+2\equiv2\pmod3}$$

Similar way we note that $$B=1^2+3^2+5^2\cdots+99^2=\sum_{n=0}^{n=49}(2n+1)^2$$ has $$50$$ terms from which there are $$17$$ multiples of $$3$$ so there are $$50-17=33$$ not multiples of $$3$$ and whose squares modulo $$3$$ are each equal to $$1$$. It follows that $$\boxed{B\equiv 0+33\equiv 0\pmod3}$$ $$\underline {\text {Proof of } \space \dfrac x2\equiv5\pmod{10}\text{ and } B\equiv0\pmod{10}}$$

For $$B=1+3^2+5^2+\cdots+97^2+99^2$$ we have $$B=\sum_{n=0}^{n=9}\left[(10n\pm1)^2+(10n\pm3)^2+(10n\pm7)^2+(10n\pm9)^2\right]\\B=1+3^2+7^2+9^2+\sum_{n=1}^{n=9}\left[400(n^2\pm n)\right]+9(1+3^2+7^2+9^2)\\\boxed{B=1400+400\sum_{n=1}^{n=9}(n^2\pm n)\equiv0\pmod{10}}$$

For $$x$$ we have $$x=\sum_{n=0}^{n=19}[(5n+1)^2+(5n+2)^2+(5n+3)^2+(5n+4)^2]+\sum_{n=1}^{n=20}(5n)^2$$ Each set of four squares in the first summation is congruent with $$0$$ modulo $$10$$ and so is with the second one because there are an even number of terms. So we have $$\boxed{x\equiv0\pmod{10}\iff x=10X}$$
(Note that this is evident using the here forbidden formula)

let's prove that $$X$$ is odd. $$10X=\sum_{n=0}^{n=19}[(5n+1)^2+(5n+2)^2+(5n+3)^2+(5n+4)^2]+\sum_{n=1}^{n=20}(5n)^2$$ $$10X=\sum_{n=0}^{n=19}(100n^2+100n+30)+\sum_{n=1}^{n=20}(5n)^2\\10X=30+100\sum_{n=1}^{n=19}(n^2+n)+19\times30+\sum_{n=1}^{n=20}(5n)^2\\10X=600+100\sum_{n=1}^{n=19}(n^2+n)+Z\hspace2cm(1)$$ where $$Z=\sum_{n=1}^{n=20}(5n)^2=\sum_{n=0}^{n=3}(100(n^2+n)+30)+25(5^2+10^2+15^2+20^2)\\Z=4\times30+25\times50+100Z=1370+100Z\hspace2cm(2)$$ putting $$(1)$$ and $$(2)$$ together and dividing by $$10$$ it yields $$\boxed{X\equiv7\pmod{10}.\text { Thus X is odd }}$$ Consequently $$x=10(2m+1)\Rightarrow \dfrac x2=10m+5$$ and $$\dfrac x2+5050\equiv5+0=5\not\equiv0\pmod{10}$$, contradiction, while $$\dfrac x2-2525\equiv 5-5\equiv0\pmod{10}$$ and the $$(a)$$ option is the only correct.