How to prove sum of squares upper bound I was wondering if anyone knew how to prove the following inequality:
$$\sum_{i=1}^N a_i^2 \leq 4\sum_{i=1}^N \left( \sum_{j=1}^i a_j \right)^2$$
where $(a_i)_{1\leq i\leq N}$ is a sequence of real numbers.
Many thanks!

Let $A_0=0$ and $A_i=\sum_{j=1}^{i}a_i$. Then the inequality can be written as:
$$\sum_{i=1}^{N}(A_i-A_{i-1})^2 \leq 4 \sum_{i=1}^{N} A_i^2 $$
or as:
$$ 2 \sum_{i=1}^{N} A_i^2 + A_N^2 + 2\sum_{i=1}^{N}A_i A_{i-1}\geq 0$$
that follows from the trivial:
$$ \sum_{i=i}^{N}(A_i+A_{i-1})^2 \geq 0.$$
