Does for every $n>1$ exist a sum of $n$ squares of consecutive natural numbers, that equals to the sum of squares of next $n-1$ consecutive numbers?

71 Views Asked by At

Can we, for every natural $n>1$, find such a natural number $k$ that sum of $n$ squares of consecutive natural numbers starting with $k$, that is $k^2+(k+1)^2+...+(k-1+n)^2$, will be equal to the sum of squares of next $n-1$ consecutive numbers that follow after them, i.e. $(k+n)^2+...+((k+n-1)+(n-1))^2$?

For $n=2$ we have Pythagorean triple $(3,4,5)$

$$3^2+4^2=5^2$$

For $n=3$, if start from number $10$, then we have that sum of squares of $n=3$ consecutive numbers (i.e. $10,11,12$) sums up to the sum of squares of the next $n-1=2$ consecutive numbers ($13,14$):

$$10^2+11^2+12^2=365=13^2+14^2$$

For $n=4$ we can have this same pattern for numbers $21,22,23,24$, followed by $4-1=3$ next numbers, i.e. $25,26,27$:

$$21^2+22^2+23^2+24^2=25^2+26^2+27^2$$

What about $n=5$ or some other $n>4$? Can we always do this?

3

There are 3 best solutions below

2
On BEST ANSWER

I use different variables: Let $k$ be the number of summands on the right and $m^2$ the greatest Summand on the left. (Thus for $3^2+4^2=5^2$, we have $m=4$ and $k+1$). Rearrange $$(m-k)^2+\cdots+(m-1)^2+m^2=(m+1)^2+\cdots+(m+k)^2$$ buy moving all but $m^2$ to the right while observing $(m+i)^2-(m-i)^2=4mi$: $$m^2=4m(1+2+\cdots+k)=2mk(k+1)$$ so that $$m=2k(k+1).$$ As expected, $k=1$ gives $n=4$. Also, $k=2$ gives $m=12$, etc.

0
On

Let's say that for some $n>1$ we have such $k>n>1$ that

$$k^2+(k+1)^2+...+(k+n-1)^2=(k+n)^2+...(k+2n-2)^2 \tag{1}$$

We can rewrite it as

$$\Bigl(1^2+2^2+...+(k+n-1)^2\Bigr)-\Bigl(1^2+2^2+...+(k-1)^2\Bigr) = \Bigl(1^2+2^2+...+(k+2n-2)^2\Bigr)-\Bigl(1^2+2^2+...+(k+n-1)^2\Bigr) \tag{2}$$

Let's denote $S(n)=\sum_{i=1}^{n}i^2=\frac{1}{6}n(n+1)(2n+1). \tag{3}$

We can rewrite $(2)$ as

$$S(k+n-1)-S(k-1) = S(k+2n-2)-S(k+n-1) \tag{4}$$

$$S(k+2n-2)+S(k-1) = 2S(k+n-1) \tag{5}$$

Now, by multiplying both sides of equation by $6$ and using $(3)$ we get

$$ (k+2n-2)(k+2n-1)(2k+4n-3) + (k-1)k(2k-1) = 2 (k+n-1)(k+n)(2k+2n-1) \tag{6}$$

Let's simplify expression on both sides of equation, by performing multiplication of brackets and grouping similar monomials:

$$(k^2+4kn+4n^2-3k-6n+2)(2k+4n-3)+k(2k^2-3k+1) =2(k+n)(2k^2+4kn+2n^2-3k-3n+1)$$

then

$$2k^3+\underline{8k^2n}+\underline{\underline{8kn^2}}-6k^2-12kn+4k+\underline{4k^2n}+\underline{\underline{16kn^2}}+16n^3-12kn-24n^2+8n-3k^2-12kn-12n^2+9k+18n-6+(2k^3-3k^2+k)= 4k^3+\underline{8k^2n}+\underline{\underline{4kn^2}}-6k^2-6kn+2k+\underline{4k^2n}+\underline{\underline{8kn^2}}+4n^3-6kn-6n^2+2n$$

After grouping we get:

$$ 0k^3 + 12n^3 + 0k^2n + 12kn^2 - 6k^2 - 30n^2 - 24kn + 12k + 24n - 6 = 0 $$

$$ 2n^3 + 2kn^2 - k^2 - 5n^2 - 4kn + 2k + 4n - 1 = 0 $$

$$ 2n^3 - 5n^2 + 4n - 1 = 0 $$

$$ k^2 - 2k (n-1)^2 + (-2n^3+5n^2-4n+1) = 0 $$

$$ k^2 - 2k (n-1)^2 - (n-1)^2(2n-1) = 0 $$

Treating it as a quadratic equation for $k$, we get

$$ \Delta_k = 4(n-1)^4 + 4(n-1)^2(2n-1) = \Bigl( 2(n-1) \Bigr)^2 (n^2-2n+1 +2n -1) = \Bigl( 2n(n-1) \Bigr)^2 $$

$$ k_1 = \frac{1}{2}\Bigl(2(n-1)^2 - 2n(n-1)\Bigr) = -(n-1) < 0 $$

$$ k_2 = \frac{1}{2}\Bigl(2(n-1)^2 + 2n(n-1)\Bigr) = (n-1)(2n-1) = 2n^2 - 3n + 1 \tag*{ $\blacksquare$} $$


As we can see, $k(n) = 2n^2-3n+1$ gives us all of the previous examples for $n=2, 3$ and $4$. We can now easily examples for other $n$ and from our solution we see that this representation is unique for given $n$.

Some more examples:

$k(5)=36$

$$ 36^2+37^2+38^2+39^2+40^2 = 41^2+42^2+43^2+44^2 $$

$k(6)=55$

$$ 55^2+56^2+57^2+58^2+59^2+60^2 = 61^2+62^2+63^2+64^2+65^2 $$

$k(7)=78$ $$ 78^2+79^2+80^2+81^2+82^2+83^2+84^2 = 85^2+86^2+87^2+88^2+89^2+90^2 $$

And so on.

0
On

When I decided, it turned out like this. It's just clearer to see.

$$n^2+(n+1)^2+...+(n+k)^2=(n+k+1)^2+(n+k+2)^2+...+(n+2k)^2$$

$$n=(2k+1)k$$