On the nilpotency class of certain wreath products It is said in a paper of P. Hall that if you have a wreath product $S=A\wr B$ where $A$ is a cyclic group of order $p^r$ and $B$ is a cyclic group of order $p^s$, then the nilpotency class of $S$ is as follows: $$rp^s-(r-1)p^{s-1}.$$ He says that this can be directly established, however he does not say how a part from the easy case of $s=1$.
Any ideas how to deduce it directly?

 A: Let's write $G=K\ltimes H$, where $K$ is a cyclic group of order $p^s$ generated by $y$, and $H$ is the direct product of $p^s$ copies of (cyclic group of order $p^r$).  We'll call the generators of $H$ $x_0, \ldots, x_{p^s-1}$, with $x_i^y=x_{i+1}$ and all subscripts are treated $\mod{p^s}$. Because $H$ is abelian, we'll use additive notation for group elements. Finally, we write
$$ z_k = [x_0, y, \ldots, y] $$
where there are $k$ $y$'s in that commutator.
Expression for $z_k$.  It's easy to prove by induction that 
$$ z_k = (-1)^k\sum_{i=0}^k(-1)^i\binom{k}{i}x_i $$
where again the subscripts are treated $\mod{p^s}$.
Why we care about $z_k$. For $k>0$, we have $z_k=0\iff G_k=\{1\}$. One direction is obvious.  Because $G_k$ is generated by commutators of length $k+1$, it's enough to show these are always trivial if we want to show $G_k$ is trivial. We will now repeatedly narrow the commutators of length $k+1$ we actually care about.


*

*Because $K$ is cyclic and $H$ is abelian, we have $[h_1y^m, h_2y^t]=[h_1, y^t]^{y^m}$. Induction then shows this works for longer lengths, and thus we really care about showing commutators of the form $[h_1, y^{m_1}, \ldots, y^{m_k}]$ are trivial.

*Because $G'\le H$ is abelian, we have $[h_1h_2,y^t]=[h_1, y^t][h_2, y^t]$. Again, induction shows this works for all lengths. Thus we only care about showing commutators of the form $[x_i, y^{m_1}, \ldots, y^{m_k}]$ are trivial.

*Since $x_i=y^{-i}x_0y^i$, we have
$$ [x_i, y^{m_1}, \ldots, y^{m_k}]=[x_0, y^{m_1}, \ldots, y^{m_k}]^{y^i}$$
So we can actually focus on showing commutators of the form $[x_0, y^{m_1}, \ldots, y^{m_k}]$ are trivial.

*We can write
$$ [x_0, y^m]=[x_0, y](y^{-1}[x_0, y]y)\cdots(y^{-(m-1)}[x_0, y]y^{(m-1)}) $$
And more generally, the same is true with $x_0$ replaced with any element of $H$. Since $G'\le H$ and $z_k=[z_{k-1},y]$, induction again shows that $[x_0, y^{m_1}, \ldots, y^{m_k}]$ can be written as a long product of $z_k$ and its conjugates.  Thus to show $G_k$ is trivial, it is enough for $z_k$ to be trivial.


So to find the nilpotency class of $G$, we're looking for the smallest $k$ with $z_k=0$. Originally, I had thought I had a combinatorial proof that the expression above for $z_k$ was trivial precisely when $k$ was the expression given by Hall.  My proof was seriously flawed, however.  Nevertheless, I found a nice article by Liebeck, "Concerning nilpotent wreath products", which not only establishes Hall's claim, but proves a generalization.  I'll try now to distill Liebeck's argument for your specific case. Perhaps one day an MSE user more versed in combinatorics than I will come along and provide a nice elementary proof of when $z_k$ is trivial.
Let $R$ be the ring $\mathbb{Z}[x]/\langle x^{p^s}-1,p^r\rangle$, which is a polynomial ring with coefficients$\mod{p^r}$ and exponents$\mod{p^s}$. Then the coefficient of $x_i$ in $z_k$ is the coefficient of $x^i$ in $(x-1)^k$. So we need to find the smallest $k$ with $(x-1)^k\equiv0$ in $R$.
We have $k\le rp^s-(r-1)p^{s-1}$. For let $n=p^{s-1}$ and $q=(p-1)n$.  Note Hall's number is $rq+n$.  Working in the field $\mathbb{Z}/p\mathbb{Z}$, we have
\begin{align*}
(x-1)^n &= x^n-1\\
(x-1)^q &= \sum_{j=0}^{p-1}x^{jn}
\end{align*}
 In $R$, these mean
\begin{align*}
(x-1)^n &= pf(x) + x^n-1\\
(x-1)^q &= pg(x) + \sum_{j=0}^{p-1}x^{jn}
\end{align*}
Let's call that sum $\phi(x)$.  Then $x^n\phi(x)=\phi(x)$ in $R$, and so $\phi(x)^2=p\phi(x)$.  Induction shows $\phi(x)^r=p^{r-1}\phi(x)$.
Putting this all together, we have
\begin{align*}
(x-1)^{rq+n} &= \left(pg(x)+\phi(x)\right)^r\cdot\left(pf(x)+x^n-1\right)\\
&= p^{r-1}h(x)\phi(x)(pf(x)+x^n-1)\\
&= p^{r-1}h(x)\phi(x)(x^n-1)\\
&= 0
\end{align*}
where we're repeatedly using $p^r=0$ in $R$, and in the last line that $\phi(x)(x^n-1)=0$.
We have $k\ge rp^s-(r-1)p^{s-1}$. This will complete the proof.  We have to show that $(x-1)^{rq+n-1}$ is not zero in $R$. Liebeck's argument is kind of messy here; I'll come back later and try and clean it up.
