# Number theory with positive integer $n$ question

If $n$ is a positive integer, what is the smallest value of $n$ such that $$(n+20)+(n+21)+(n+22)+ ... + (n+100)$$ is a perfect square? I don't even now how to start answering this question.

• The most obvious place to start is probably to compute the sum. (well, that becomes obvious if you've already taken the step to classify what kind of sum that is)
– user14972
Commented Apr 10, 2014 at 16:45

Write it as $81n+\frac{81}{2}(100+20)=81(n+60)$

$81$ is a perfect square. For what least $n$ is $60+n$ a perfect square?

$n=4$

• Did you use a formula to get that statement? If so, which one? Commented Apr 10, 2014 at 16:52
• @user108104 en.wikipedia.org/wiki/Arithmetic_progression Commented Apr 10, 2014 at 16:52
• Ok I just got confused because you swapped the 100 and 20 around. Commented Apr 10, 2014 at 16:58

separate out the constant and variable so we get $81/2\cdot120 = 4860$ and $81\cdot n$.
We are now looking for the closest perfect squares such that when $4860$ is subtracted from it the difference is a multiple of $81$.

Now closest to $4860$ we have \begin{align*} 70^2 & =4900 \\ 71^2 &=5041 \\ 72^2 &= 5041 \end{align*}

Now $5041-4860 = 324 = 81\cdot 4$ so the least value of $n$ to make the above expression a perfect square is $n=4$.

Good question!

• Welcome to Math.SE I have taken the time to improve your answer by adding LaTeX to improve readability. Very nice first answer ;) Commented Apr 10, 2014 at 17:33
• Thanks I have a rather messy habit of scribbling while solving Commented Apr 10, 2014 at 17:55
• No problem. I suggest you read the MathJax tutorial so you can do this yourself in the future. Commented Apr 10, 2014 at 17:56

Hint: Let $$f(n) = (n+20)+(n+21)+(n+22)+ ... + (n+100)=81n+\frac{100\cdot101}{2}-\frac{19\cdot20}{2}=81n+4860=81(n+60)$$ Now since $81$ is already a perfect square you have to find the smallest $n$ for which $n+60$ is a perfect square too...$\Rightarrow n=4$ and $f(n) = 72^2$

Although equation:

$(n+20)+(n+21)+...+(n+100)=81(n+60)=81y^2$

Solutions have the form:

$y=\frac{k+1}{2}$

$n=\frac{k^2+2k-239}{4}$

$k$ - can be any character.