# What are all the finite groups where every nontrivial element has order $3?$

I know that the powers of any group where all elements have order $$3$$ also has this property. I also know that the Heisenberg group has this property and that all finitely generated such groups are finite. What are all the finite groups where every nontrivial element has order $$3?$$ In particular, what is the order and structure of the free Burnside group $$B(m,3)?$$

Levi and van der Waerden proved groups of exponent $$3$$ are nilpotent of class at most $$3.$$ By work of Levi, they are also $$2-$$Engel. The complete description appears in Marshall Hall, Jr.'s The Theory of Groups, Section 18.2.
The order of $$B(3,r)$$ (the free Burnside group of exponent $$3$$ and rank $$r$$, following the notation of Hall) is $$3^{m(r)}$$, where $$m(r) = r+\binom{r}{2} + \binom{r}{3}$$ (Theorem 18.2.1), and every element can be written uniquely as $$g=x_1^{a_1}\cdots x_r^{a_r}\prod_{1\leq i\lt j\leq r}[x_i,x_j]^{b_{ij}} \prod_{1\leq i\lt j\lt k\leq r}[x_i,x_j,x_k]^{c_{ijk}}$$ with exponents taken modulo $$3$$, where the $$x_i$$ are the free generators; the product is given by the standard commutator collection formulas.
• @matlander Also standard notation when working with varieties and nilpotent groups. $[a,b,c]=[[a,b],c]$, when following left-normed convention (which goes with $[a,b]=a^{-1}b^{-1}ab$). Commented Oct 27, 2022 at 0:56