Problem:
Determine the smallest natural number
n>2 such that there exist
n consecutive integers whose sum of their squares is a perfect square.
Proposed by Alessandro Ventullo, Milan, Italy
Solution:
Observe that
(-4)^2+(-3)^2+(-2)^2+(-1)^2+0^2+1^2+2^2+3^2+4^2+5^2+6^2=121=11^2, so
n=11 works. We prove that this is the smallest natural number greater than
2 that satisfies the given condition.
(i)
n=3. Let
m \in \mathbb{Z}. We have
(m-1)^2+m^2+(m+1)^2=3m^2+2 \equiv 2 \pmod{3}, so the sum of the squares of
3 consecutive integers cannot be a perfect square.
(ii)
n=4. Let
m \in \mathbb{Z}. We have
(m-1)^2+m^2+(m+1)^2+(m+2)^2=4m^2+4m+6 \equiv 2 \pmod{4}, so the sum of the squares of
4 consecutive integers cannot be a perfect square.
(iii)
n=5. Let
m \in \mathbb{Z}. We have
(m-2)^2+(m-1)^2+m^2+(m+1)^2+(m+2)^2=5(m^2+2), but
m^2+2 \not \equiv 0 \pmod{5}, so the sum of the squares of
5 consecutive integers cannot be a perfect square.
(iv)
n=6. Let
m \in \mathbb{Z}. We have
(m-2)^2+(m-1)^2+m^2+(m+1)^2+(m+2)^2+(m+3)^2=6m(m+1)+19. Since
m(m+1) is even, then
6m(m+1) \equiv 0 \pmod{4} and
6m(m+1)+19 \equiv 3 \pmod{4}. So the sum of the squares of
6 consecutive integers cannot be a perfect square.
(v)
n=7. Let
m \in \mathbb{Z}. We have
(m-3)^2+(m-2)^2+(m-1)^2+m^2+(m+1)^2+(m+2)^2+(m+3)^2=7(m^2+4), but
m^2+4 \not \equiv 0 \pmod{7}, so the sum of the squares of
7 consecutive integers cannot be a perfect square.
(vi)
n=8. Let
m \in \mathbb{Z}. We have
(m-3)^2+(m-2)^2+\ldots+(m+3)^2+(m+4)^2=4[2m(m+1)+11]. Since
m(m+1) is even, then
2m(m+1) \equiv 0 \pmod{4} and
2m(m+1)+11 \equiv 3 \pmod{4}. So the sum of the squares of
8 consecutive integers cannot be a perfect square.
(vii)
n=9. Let
m \in \mathbb{Z}. We have
(m-4)^2+(m-3)^2+\ldots+(m+3)^2+(m+4)^2=3(3m^2+20), but
3m^2+20 \not \equiv 0 \pmod{3}, so the sum of the squares of
9 consecutive integers cannot be a perfect square.
(viii)
n=10. Let
m \in \mathbb{Z}. We have
(m-4)^2+(m-3)^2+\ldots+(m+4)^2+(m+5)^2=5[2m(m+1)+17], but
2m(m+1)+17 \not \equiv 0 \pmod{5}, so the sum of the squares of
10 consecutive integers cannot be a perfect square.
The conclusion follows.
Note:
The solution is not unique. For example,
18^2+19^2+20^2+21^2+22^2+23^2+24^2+25^2+26^2+27^2+28^2=77^2.
It's easy to see why. We must find
m \in \mathbb{Z} such that
(m-5)^2+(m-4)^2+\ldots+(m+4)^2+(m+5)^2=11(m^2+10) is a perfect square. So,
m \equiv \pm 1 \pmod{11} and one can check if
11(m^2+10) is a perfect square.
Conjecture:An easy case by case analysis shows that there are no solutions for
11<n \leq 22. For
n=23 there is a solution given by
17^2+18^2+19^2+\ldots+27^2+28^2+29^2=138^2. (Observe that
(m-11)^2+\ldots+(m+11)^2=23(m^2+44) and it must be
m \equiv \pm 5 \pmod{23} and
m \equiv 0 \pmod{2})
If n>1 is a natural number n such that there exist n consecutive integers whose sum of their squares is a perfect square, then n is prime.