<s>[INST] 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?

 [/INST] 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$.
</s>