A characterization for subgroups. Let $G$ be a group and $a_0,a_1,...,a_n\in G$ and
$$A=\{a_0,a_1,...,a_n\}$$
and
$$(\forall m\le n)(\forall i\le m)(a_{i}a_{m-i}\in A)$$
Is $A$ a subgroup of $G$? How if $G$ is abelian?

Let $n = 1$, $G = \mathbb{Z}/4\mathbb{Z}$.
Now let $A = \{0,1\}$. Now note that each of the sums $0+0,0+1,1+0$ are in $A$.
Hence $A$ satisfies the given condition but is not a subgroup. (Notice that
the sum $2 = 1+1$ doesn't have to be in $A$ since that would correspond to
$a_1 + a_1$ which would require $i = 1,m = 2$ when we have $m \leq 1$).
If one changes the condition to $a_ia_j\in A$ for any indices $i,j\leq n$ (not just pairs whose sum is at most $n$), then you can check that $A$ must be a subgroup.
