question about double sums Suppose we have an expression 
$$ \sum_{1 \leq k < j \leq n } f(k)f(j) $$
Can we express this as a double sum like 
$$ \sum_{k=1}^n \sum_{j=1}^n f(k)f(j) $$
???
 A: I'd rather say:
$$\sum_{1\leq k\leq j\leq n}f(j)\,f(k)=\frac{1}{2}\left(\left(\sum_{h=1}^{n}f(h)\right)^2+\sum_{h=1}^{n}f(h)^2\right),$$
$$\sum_{1\leq k< j\leq n}f(j)\,f(k)=\frac{1}{2}\left(\left(\sum_{h=1}^{n}f(h)\right)^2-\sum_{h=1}^{n}f(h)^2\right).$$
A: Not quite. As $k$ ranges from $1$ to $n-1$, $j$ ranges from $k+1$ to $n$. So you should have $$\sum_{k = 1}^{n-1} \sum_{j = k+1}^n f(k)f(j)$$
A: Say $n=3$. The original sum contains only the red terms in this matrix:
$$
\begin{bmatrix}
f(1)f(1) & \color{red}{f(1)f(2)} & \color{red}{f(1)f(3)} \\
f(2)f(1) & f(2)f(2) & \color{red}{f(2)f(3)} \\
f(3)f(1) & f(3)f(2) & f(3)f(3) \\
\end{bmatrix}
$$
However, your proposed sum contains all of the terms in the matrix! 
This isn't hard to fix, though. Notice that the matrix is symmetric because $f(j)f(k) = f(k)f(j)$, so the original sum is half your sum, once you get rid of the diagonal terms:
$$
\sum_{1 \leq k < j \leq n } f(k)f(j) = \frac{1}{2}\left[ \sum_{k=1}^n \sum_{j=1}^n f(k)f(j) - \sum_{k=1}^n f(k)f(k)\right].
$$
Then you get Jack's answer by recognizing that
$$
\sum_{k=1}^n \sum_{j=1}^n f(k)f(j) = \sum_{k=1}^n f(k) \times \sum_{j=1}^n f(j)=\left( \sum_{k=1}^n f(k) \right)^2.
$$
A: No. You haven't taken into account the middle inequality in $1\leq k<j\leq n$. So your second sum should be $$\sum_{k=1}^n\sum_{j=k+1}^nf(k)f(j).$$ 
