Regarding the nilpotency class of finite p-groups I'm aware that for a $p$-group $G$ of order $p^{n}$, say, that $G$ must have a nilpotency class between 1 and $n - 1$ for $n\geq 2$. My question is why can $G$ not have nilpotency class $n$? Take for example a group of order $p^{3}$. Why is it not possible to make a lower central series with orders $p^{3} \rightarrow p^{2} \rightarrow p \rightarrow 1$? I know all the 5 possible groups in this case have nilpotency class 1 or 2. But since there's theoretically 'room' for there to be a chain of length 4, how do we know this is never the case in general?
 A: This question was answered in the comments by Derek Holt over a year ago. So that this question does not remain "unanswered", I will include his argument as an answer here but then also include a different way of seeing this corresponding to the upper central series, based on some lecture notes of Gustavo Fernández-Alcober.
Any mistakes in the following are my own.
Argument involving the Lower Central Series
Based on comments by Derek Holt
It is the case that $G/[G,G]$ must have order at least $p^{2}$. To see this, consider any normal subgroup $N$ of $G$, such that $N$ has index $p^{2}$ (as we are in a p-group with order at least $p^{2}$ we know such a subgroup must exist). Then $G/N$ is a group of order $p^{2}$ and so must be abelian, and hence $[G,G] \leq N $. It follows that
$|G/[G,G]| \geq p^{2}$. 
Then if $G$ has class $c$, the lower central series has $c+1$ terms and $c$ factors. Each of these factors must have order at least $p$ (or else we would have a redundant term), and the factor $G/\gamma_{2}(G)$ must have order at least $p^{2}$. Then as the order of $G$ is equal to the product of these factors, we obtain that  $|G|=p^{n}\geq p^{c+1}$ and thus $c \leq n-1$.
Argument involving the Upper Central Series
This is based on Theorem 1.15 in the lecture notes "An introduction to finite $p$-groups: Regular $p$-groups and groups of maximal class", by Gustavo Fernández-Alcober .
In a similar way, we can consider the Upper Central series of $G$, where $G$ has class $c$:
$$G=Z_{c}(G)>Z_{c-1}(G)\dots >Z_{0}(G)=1$$
and we can show that $[G:Z_{c-1}(G)| \geq p^{2}$. Suppose for contradiction that the index was $p$. If $c=1$ then that would mean $G$ is cyclic of order $p$, contradicting the assumption that $|G|\geq p^{2}$. Thus we may assume $c \geq 2$. 
We consider the quotient group $G/Z_{c-2}(G)$. Recall from the definition of the upper central series that $Z(G/Z_{c-2}(G))=Z_{c-1}(G)/Z_{c-2}(G)$. Then 
$$\frac{G/Z_{c-2}(G)}{Z(G/Z_{c-2}(G))}= \frac{G/Z_{c-2}(G)}{Z_{c-1}(G)/Z_{c-2}(G)} \cong G/Z_{c-1}(G)$$ by the Isomorphism theorems. But $G/Z_{c-1}(G)$ is cyclic of order $p$ and so is abelian. Hence $G=Z_{c-1}(G)$ contradicting that the class is $c$. 
Thus we may assume that the order of the first factor is at least $p^{2}$, and then as before multiplying the orders of the factors shows us that $p^{n} \geq p^{c+1}$ and the result follows.
Remarks


*

*For yet another proof of this, see Corollary 4.2 in the book "$p$-Automorphisms of finite $p$-groups" by Evgenii Khukhro. 

*$p$-groups of order $p^{n}$ and class $n-1$ are known as groups of maximal class. These groups are well studied and searching this phrase should bring up plenty of information on them.

