Given $F = F(x_0,\ldots,x_n)$ the free group on $n+1$ generators. Define a function $M: F\rightarrow \mathbb{N}$ such that $F(w) = l$, if the smallest group in which $w$ is not an identity is of size $l$.

My question is what the function $M$ looks like. Are there nice bounds?

Here are some observations that have come from earlier discussions I have had about this question.

0)if there is a subset of the generators appearing in $w$ where the sum of the exponents is nonzero, then you can use a cyclic group where the order of the group does not divide this sum of exponents as an example.

1) an upper bound of $F(w)$ is $|w|!$: you can by hand construct a permutation group in which the identity is not satisfied. (the fact that $M$ is welldefined is equivalent to the residual finiteness of the free group)

2) the function $M$ is unbounded: every finite group $G$ on $n+1$ generators corresponds to a finite index subgroup of $F$ (a group $W\subseteq F$ for which $G = F/W$; for each $G$ there are finitely many such $W$), and the intersection of finitely many finite index subgroups is still of finite index. So take all groups of size less then $k$, every word in the intersection of their corresponding finite index subgroups requires a group of size greater than $k$ to not be satisfied.