Smallest positive integer


1^2+2^2=5, which is not a square.

1^2+2^2+3^2=14, which is not a square.

What is the smallest positive integer value of n, n>1, such that 1^2+2^2+ \dots +n^2 is a square number?

Are there any larger possible values of n?

To show that \sum\limits_{r=1}^{n}{{{r}^{2}}}={{N}^{2}} has a unique solution in integers for n>1.

Since \operatorname{hcf}\left( m,n \right)=\operatorname{hcf}\left( m,m+n \right), with m=n+1 we have that n,n+1 and 2n+1 are co-prime.

For  \sum\limits_{r=1}^{n}{{{r}^{2}}}=\frac{n\left( n+1 \right)\left( 2n+1 \right)}{6} to be square the (co-prime) terms in the numerator must be square numbers multiplied by coefficients with product 6.

n n+1 2n+1 Reason why not possible
6{{a}^{2}} {{b}^{2}} {{c}^{2}}
{{a}^{2}} 6{{b}^{2}} {{c}^{2}} n+1=6{{b}^{2}}\Rightarrow 2n+1=12{{b}^{2}}-1 which can’t be square since congruent to 11(mod12).
{{a}^{2}} {{b}^{2}} 6{{c}^{2}} 2n+1 is an odd number but 6{{c}^{2}} is even.
{{a}^{2}} 2{{b}^{2}} 3{{c}^{2}} n+1=2{{b}^{2}}\Rightarrow 2n+1=4{{b}^{2}}-1 which can’t be square since congruent to 3(mod4).
{{a}^{2}} 3{{b}^{2}} 2{{c}^{2}} 2n+1 is an odd number but 2{{c}^{2}} is even.
2{{a}^{2}} {{b}^{2}} 3{{c}^{2}} n=2{{a}^{2}}\Rightarrow 2n+1=4{{a}^{2}}+1 but this is not divisible by 3:
4{{\left( 3k\pm 1 \right)}^{2}}+1\equiv 2\left( \bmod 3 \right) and 4{{\left( 3k \right)}^{2}}+1\equiv 1\left( \bmod 3 \right).
2{{a}^{2}} 3{{b}^{2}} {{c}^{2}} n+1=3{{b}^{2}}\Rightarrow 2n+1=6{{b}^{2}}-1 which can’t be square since congruent to 5(mod6).
3{{a}^{2}} {{b}^{2}} 2{{c}^{2}} 2n+1 is an odd number but 2{{c}^{2}} is even.
3{{a}^{2}} 2{{b}^{2}} {{c}^{2}} n+1=2{{b}^{2}}\Rightarrow 2n+1=4{{b}^{2}}-1 which can’t be square since congruent to 3(mod4).

This leaves only n=6{{a}^{2}}, n+1={{b}^{2}}, 2n+1={{c}^{2}}.

Since \operatorname{hcf}\left( n+1,2n+1 \right)=1 then \operatorname{hcf}\left( {{b}^{2}},{{c}^{2}} \right)=1 and so \operatorname{hcf}\left( b,c \right)=1 and \operatorname{hcf}\left( b,b+c \right)=1.

\operatorname{hcf}\left( b-c,b+c \right)=\operatorname{hcf}\left( 2b,b+c \right) and by the line above this is 1 or 2.

{{c}^{2}}-{{b}^{2}}=\left( c-b \right)\left( c+b \right)=6{{a}^{2}}. Note a=1 does not lead to a solution (since 6\times {{1}^{2}}+1 is not square)  so the factors could be

c-b c+b Reason why not possible
1 6{{a}^{2}} 2c=1+6{{a}^{2}} would not give an integer for c.
2 3{{a}^{2}}
3 2{{a}^{2}} 2c=3+2{{a}^{2}} would not give an integer for c.
6 {{a}^{2}} {{c}^{2}}={{\left( b+6 \right)}^{2}}={{b}^{2}}+12b+36. This leads to n=12b+36 and so {{b}^{2}}-1=12b+36 which does not have integer solutions.
{{a}^{2}} 6 c>b>1 . Only possibility is c=4,b=2 but doesn’t lead to a solution.

This leaves only c-b=2,c+b=3{{a}^{2}} . Substitute c=b+2 in n+1={{b}^{2}},2n+1={{c}^{2}} leads to {{b}^{2}}-4b-5=0. Then b=5,c=7,a=2 giving n=24,n+1=25,2n+1=49.

    \[\sum\limits_{r=1}^{24}{{{r}^{2}}}={{\left( 2\times 5\times 7 \right)}^{2}}={{70}^{2}}.\]

 

For N>1 the next solution is N=24 (sum=4900 ie 70×70)

It is worth noting that N=1, N=24 are the only solutions. An extensive proof can be found by Prof. G.N. Watson in ”Messenger of Mathematics” 1918, Volume 48, Pages 1-22 (an electronic version can be seen at: http://archive.org/stream/messengerofmathe4849cambuoft#page/n9/mode/2up)

Problem Page Coordinator: Stephen Lee CMath MIMA – Mathematics in Education and Industry
Acknowledgement: The IMA are indebted to MEI for sourcing and supplying Mathematics Today with these well-known puzzles.
First published in Mathematics Today December 2016
Image credit: University Club Entryway Pilaster Letter N (New York, NY) by takomabibelot / Flickr / CC-BY-PD-1.0
Published