# Finite Summation = Perfect Square

Find the sum of all positive integers $n\leq 1000$ such that the double sum \begin{aligned} \sum_{i=1}^n\sum_{j=1}^n (i-j)^2 \end{aligned} is a perfect square.

×