Question: Find all integers $n$ such that the group of units of $\mathbb{Z}/n\mathbb{Z}$ is an elementary abelian $2$-group.
Thoughts: I know that $u$ is a unit in $\mathbb{Z}/n\mathbb{Z}$ if and only if $n$ and $u$ are coprime. So, in each ring, there are $\phi(n)$ units. But I am not sure if there is a "nice" way to see if every non-trivial element in $U(n)$ has order $2$. I was thinking of breaking it down into even and odd $n$, or considering how many units each ring has, but I wasn't able to notice anything useful. Any help is greatly appreciated! Thank you.
The question is asked here: For what values of $n$ is $U(\mathbb{Z}_n)$ an elementary abelian 2-group?, but I wasn't able to get to a conclusion on based on the last hint.