Variety satisfying an identity. $V$ is a variety of commutative semigroup satisfying the identity $x^2 = x^3$. 
I need to prove that:
$|F_V(\{x_1,\dots,x_n\})|$ = $3^n -1$.
Any hints on this ?
$F_V$ is V-free algebra.
 A: Let $F(\{x_1,\dots,x_n\})$ be the free semigroup on these generators. The domain of this algebra can be identified with the set of words in the generators $x_1,\dots,x_n$. By commutativity and associativity, any word can be expressed as $x_1^{e_1}\cdot \dots \cdot x_n^{e_n}$ for some $e_1,\dots,e_n$ not all zero (since this is a semigroup, not a monoid, we don't get an identity element for free).
Now for the free $V$-algebra on these generators, we have $F_V(\{x_1,\dots,x_n\})\cong (F(\{x_1,\dots,x_n\})/\equiv)$, where $\equiv$ is the congruence generated by the relation $x^3 = x^2$. If $x_i$ is a generator, it's easy to see that $x_i^n = x^2$ for all $n\geq 2$, by reducing the power repeatedly until it gets down to $2$. So the words $\{x_1^{e_1} \dots  x_n^{e_n}\mid  e_1,\dots,e_n\in \mathbb{N} \text{ not all zero}\}$ at least reduce to words in the set $W = \{x_1^{e_1} \dots x_n^{e_n}\mid  e_1,\dots,e_n\in \{0,1,2\} \text{ not all zero}\}$. Note that there are $3^n-1$ words in $W$.
$W$ inherits a semigroup structure from $F(\{x_1,\dots,x_n\})$ by $(x_1^{e_1} \dots  x_n^{e_n}) (x_1^{d_1} \dots  x_n^{d_n}) = x_1^{f(e_1+d_1)} \dots  x_n^{f(e_n+d_n)}$, where $f(n) = 2$ if $n \geq 2$ and $f(n) = n$ if $n<2$. It remains to check that this semigroup satisfies the relation $x^3 = x^2$ for all elements, not just the generators.
Well, $(x_1^{e_1}\dots x_n^{e_n})^3 = x_1^{f(3e_1)}\dots x_n^{f(3e_n)}$, and $(x_1^{e_1}\dots x_n^{e_n})^2 = x_1^{f(2e_1)}\dots x_n^{f(2e_n)}$. These are equal, since for each $i$, if $e_i = 0$, then $f(3e_i) = f(2e_i) = 0$, and if $e_1 >0$, then $f(3e_i) = f(2e_i) = 2$.
