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. 
 A: 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$

A: 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!
A: 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$
A: 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.
