Examples where $(a+b+\cdots)^2 = (a^2+b^2+\cdots)$ Consider the two infinite series
$$
    \frac{\pi}{\sqrt{8}} = 1 + \frac{1}{3} - \frac{1}{5} - \frac{1}{7} + \frac{1}{9} + \frac{1}{11} - \cdots
$$
and
$$
    \frac{\pi^2}{8} = 1 + \frac{1}{3^2} + \frac{1}{5^2} + \frac{1}{7^2} + \frac{1}{9^2} + \frac{1}{11^2} + \cdots
$$
(Notice that the first series has signs that go two-by-two rather than every-other.)
Squaring the first equality also gives $\pi^2/8$ and so these two, when put together, satisfy the 'highschooler's dream' for squaring a sum: just square each term and sum,
$$
    (a + b + c + \cdots)^2 = (a^2 + b^2 + c^2 + \cdots)
$$
with nothing like $2ab + 2ac + 2bc + \cdots$ needed.
A trivial example of this would be
$$
    (a + 0)^2 = a^2 + 2a0 + 0^2 = a^2 + 0^2
$$
but it only succeeds because one addend is zero.
My questions are

*

*Are there any other simple nontrivial examples?  I believe any other nontrivial example must be an infinite sum. edit: John Omielan provides the simple finite example $(1+1-\frac{1}{2})^2 = 1^2 + 1^2 + \frac{1}{2^2}$.

*Is there an "obvious" demonstration that the above sum (other than the direct evaluation) satisfies the highschooler's dream?  Put another way, is there a simple demonstration that the infinite sum of "cross terms" vanishes?

 A: one example would be, if $\omega$ is a complex cube root of unity, then
$$(1+\omega+\omega^2)^2=1+\omega^2+\omega^4$$
A: It may qualify as trivial, but note that there are infinitely many such series.
Consider a divergent series with positive decreasing terms $\sum_{n=1}^\infty u_n$, such that $\sum_{n=1}^\infty u_n^2$ is convergent to $L$, then it's a known theorem that we can change the signs of $u_n$ so as to get a series convergent to any given real number. Just pick $\sqrt{L}$.
That is, there exist $\sigma_n\in\{+1,-1\}$ such that $\sqrt{L}=\sum_{n=1}^\infty \sigma_nu_n$ while $L=\sum_{n=1}^\infty (\sigma_nu_n)^2$.

The idea of the proof of the aforementioned theorem, assuming $x>0$ (otherwise start with negative terms): sum $u_n$ until you get a value greater than $x$, call it $v_1$. Then sum $-u_n$ until you get a value smaller than $x$, call the sum of the new terms $v_2$, and continue this process to define $v_k$ for all $k$. Then $\sum_k v_k$ is alternating and convergent to $x$.
A: There are arbitrary length examples with real numbers. Moreover, you can take almost arbitrary first $k-1$ numbers $a_1$, $a_2$, ... , $a_{k-1}$ and always exists $a_k$ such that $$(a_1+a_2+...+a_{k-1}+a_k)^2=a_1^2+a_2^2+...+a_{k-1}^2+a_k^2$$
Let's prove it: Mark partial sums as $a_1 +...+a_{k-1}=A \neq 0$ and $a_1^2+a_2^2+...+a_{k-1}^2=B$. Then $a_k$ must satisfy $$(A+a_k)^2=B+a_k^2$$
$$A^2+2Aa_k+a_k^2=B+a_k^2 \Rightarrow 2Aa_k=B-A^2 \Rightarrow a_k=\frac{B-A^2}{2A}$$
The only limitation put on $a_1$, ..., $a_{k-1}$ for existence of $a_k$ is that $A\neq 0$.
A: The first term
$$
\eqalign{
  & \left( {a_1  + a_2  +  \cdots  + a_n } \right)^2  = R^2 \quad  \Rightarrow   \cr 
  &  \Rightarrow \quad \left( {{{a_1 } \over R} + {{a_2 } \over R} +  \cdots
  + {{a_n } \over R}} \right)^2  - 1 = 0\quad  \Rightarrow   \cr 
  & \left( {\left( {b_1  + b_2  +  \cdots  + b_n } \right) + 1} \right) \cdot
 \left( {\left( {b_1  + b_2  +  \cdots  + b_n } \right) - 1} \right) = 0 \cr} 
$$
is the equation (in $b_k$) of two diagonal planes, symmetric wrt the  origin, with normal vector $(1,1, \ldots , 1)$,
through the point
$$
 \pm \left( {{1 \over n},{1 \over n}, \ldots ,{1 \over n}} \right)
$$
and thus each at a distance from the origin of
$$
{1 \over {\sqrt n }}
$$
The second term
$$
\eqalign{
  & a_1 ^2  + a_2 ^2  +  \cdots  + a_n ^2  = R^2 \quad  \Rightarrow   \cr 
  &  \Rightarrow \quad b_1 ^2  + b_2 ^2  +  \cdots  + b_n ^2  = 1 \cr} 
$$
is a unitary sphere centered at the origin.
Therefore the equality
$$
\eqalign{
  & \left( {a_1  + a_2  +  \cdots  + a_n } \right)^2  = a_1 ^2  + a_2 ^2  +  \cdots  + a_n ^2  = R^2
 \quad  \Rightarrow   \cr 
  &  \Rightarrow \quad \left( {b_1  + b_2  +  \cdots  + b_n } \right)^2
  = b_1 ^2  + b_2 ^2  +  \cdots  + b_n ^2  = 1 \cr} 
$$
is satisfied whenever the points $b_k$ lie on one of the two circles resulting from the intersection,
and the points $a_k$ on any dilation of those circles, i.e. on the conic surface with vertex at the origin, axis $(1,1, \ldots , 1)$, cross-section defined by the  above circle on the unitary sphere.
A: I don't know if this may interest you or answer your question but if you play around with field different from $\mathbb{R}$, special things happens. For example working with field $\mathbb{F}$ with characteristic equal to 2 it's always true that
$$(a+b)^2 = a^2 + b^2, \space \forall a,b \in \mathbb{F}$$
And if we take another finite sum $(a + b+ c+ d)^2$ in order to obtain the claim what we want is
$$2(ab + ac + ad + ...) = 0$$
and since that term is even we can choose a field with proper even characteristic and we obtain a series of examples that are non trivial.
A: My answer is the same as Ivan's. However I give an alternative proof of his statement, which is too long for a comment.

You can take almost arbitrary first $k-1$ numbers $a_1$, $a_2$, ... ,
$a_{k-1}$ and always exists $a_k$ such that
$$(a_1+a_2+...+a_{k-1}+a_k)^2={a_1}^2+{a_2}^2+...+{a_{k-1}}^2+{a_k}^2$$

My Proof:
We have:
$$ (a_1+a_2+...+a_{k-1})^2=a_1^2+a_2^2+...+{a_{k-1}}^2 \iff \sum_{1\ \leq\ i\ <\ j\ \leq\ k-1} a_i a_j = 0. $$
Now let
$$a_k = \frac{ - \left(\displaystyle\sum_{1\ \leq\ i\ <\ j\ \leq\ k-1} a_i a_j\right) } { \displaystyle\sum_{i=1}^{k-1} a_i}.$$
This implies:
$$ \sum_{1\ \leq\ i\ <\ j\ \leq\ k} a_i a_j = \sum_{1\ \leq\ i\ <\ j\ \leq\ k-1} a_i a_j + a_k \sum_{i=1}^{k-1} a_i = 0, $$
with the definition of $a_k$ being possible if and only if $\displaystyle\sum_{i=1}^{k} a_i \neq 0.$
