What is the smallest integer $n$, greater than one, for which the root-mean-square of the first $n$ positive integers is an integer? $\mathbf{Note.}$ The root-mean-square of $n$ numbers $a_1, a_2, \cdots, a_n$ is defined to be \[\left[\frac{a_1^2 + a_2^2 + \cdots + a_n^2}n\right]^{1/2}\]
Problem
Source:
Tags: AMC, USA(J)MO, USAMO, quadratics, number theory, relatively prime, algebra
hunter34
17.08.2011 02:01
The average of the sum of squares is $\frac{(n+1)(2n+1)}{6}$. Since this must be an integer, $n$ could be either $6m+1$ or $6m-1$ for some $m\in\mathbb{N}$.
If $n=6m-1$, the expression becomes $m(12m-1)$. Since $m$ and $12m-1$ are relatively prime, they both must be squares. But $12m-1$ cannot be a square since -1 is not a quadratic residue modulo 12. Thus, there are no solutions for $n=6m-1$.
If $n=6m+1$, the expression becomes $\frac{(6m+2)(12m+3)}{6}=12m^2+7m+1=(3m+1)(4m+1)$. But since $3m+1$ and $4m+1$ are relatively prime, both of this must be squares. Since $3m+1<4m+1$, let $3m+1=a^2$ and let $4m+1=(a+b)^2$. Then, $4m+1-(3m+1)=m=(a+b)^2-a^2=2ab+b^2$. Substituting back into $3m+1=a^2$ give $3(2ab+b^2)+1=a^2\implies a^2-6ab-(3b^2+1)=0$. By the quadratic formula $a=3b+\sqrt{12b^2+1}$. Since $a$ must be an integer, $b=2$ is the smallest solution. This implies that $3m+1=13^2$ which implies that $m=56$. Thus, $n=6(56)+1=\boxed{337}$
Wave-Particle
17.01.2018 07:27
Let $k^2 = \frac{\sum_{i=1}^n i^2}{n} = \frac{(n+1)(2n+1)}{6}$. In order for the $RHS$ to be an integer, we must have $n\equiv 1\pmod 6$. Hence, we make the substitution $n = 6n'+1$. We now have $$k^2 = \frac{(6n'+2)(12n'+3)}{6} = (3n'+1)(4n'+1).$$Since $\gcd(3n'+1,4n'+1)=\gcd(3n'+1,m)=\gcd(1,n')=1$, we know that $3n'+1 = k_1^2$ and $4n'+1=k_2^2$. Subtracting the two equations, $$n' = k_2^2-k_1^2 = (k_2-k_1)(k_2+k_1).$$Let $k_2 -k_1= \Delta k$. Thus, $n' = \Delta k (2k_1+\Delta k)$. Plugging this into $3n'+1=k_1^2$ and solving for $k_1$, we get $$k_1=3\Delta k + \sqrt{12\Delta k^2+1}.$$Note that $\Delta k = 2$ is the smallest integer that produces an integer solution for $k_1$. Solving for $n$, we get $n = 6n'+1=6\cdot 56+1= \boxed{337}$.
proshi
31.05.2018 18:20
We want to find an integer $n$ such that $\sqrt{\dfrac{1^2+2^2+\cdots+n^2}{n}}=x$ where $n$ is an integer greater than 1 and $x$ is an integer. We will use the formula that states $1^2+2^2+3^2+\cdots+n^2=\dfrac{n(n+1)(2n+1)}{6}.$ Substituting that formula for the numerator in the fraction yields $\sqrt{\dfrac{(n+1)(2n+1)}{6}}=x.$ Squaring both sides gives us $\dfrac{(n+1)(2n+1)}{6}=x^2.$ Therefore, we have $(n+1)(2n+1)=6x^2.$
We can complete the square to get $(4n+3)^2=48x^2+1.$ Subtracting $48x^2$ from both sides gives us $(4n+3)^2-48x^2=1.$ So now we have a Pell equation to deal with. We can use the difference of squares factorization to get $(4n+3-4x\sqrt{3})(4n+3+4x\sqrt{3})=1.$
We know that the smallest solution to this Pell equation is $n=1$ and $x=1.$ So, we can substitute that in to get $(7-4\sqrt{3})(7+4\sqrt{3})=1.$ Squaring both sides $(97-56\sqrt{3})(97+56\sqrt{3})=1.$ So, in this case $4n+3=97\implies n=23.5.$ But, $n$ has to be an integer so our answer cannot be correct. Therefore, instead of squaring we cube our Pell equation to get $(1351-780\sqrt{3})(1351+780\sqrt{3})=1.$
So, $4n+3=1351\implies \boxed{n=337}.\blacksquare$