A Question on $p$-groups. Suppose $G$ is a group with order $p^{n}$ ($p$ is a prime).
Do we know when we can find the subgroups of $G$ of order $p^{2}, p^{3}, \cdots, p^{n-1}$?
 A: This is one of the Sylow Theorems. 

If $p$ is a prime and $p^k,k\geq 0$, divides $|G|$ (assumed finite), then $G$ contains a subgroup of order $p^k$. 

Proof: This follows by induction on $|G|$. If $|G|=1$, it is clear, so suppose it holds for all groups of order less than $|G|$. Recall Cauchy's theorem, if $G$ is a finite abelian group and $p$ a prime divisor of $|G|$, then $G$ contains an element of order $p$. Now consider the class equation
$$
|G|=|C|+\sum [G:C(y_i)]
$$
where $C$ is the center of $G$, and $C(y_i)$ the centralizer of $y_i$. If $p\nmid |C|$, then $p\nmid [G:C(y_i)]$ for some $j$. Thus $p^k\mid |C(y_j)|$ and the subgroup $C(y_i)$ has order $|G|$ since $y_j\notin C$. By the induction hypothesis, $C(y_j)$ contains a subgroup of order $p^k$. If $p\mid |C|$, then by Cauchy's theorem, $C$ contains an element $c$ of order $p$. So $\langle c\rangle$ is a normal subgroup of $G$ with order $p$, and the order $|G|/p$ of $G/\langle c\rangle$ is divisible by $p^{k-1}$. By induction, $G/\langle c\rangle$ has a subgroup of order $p^{k-1}$. This subgroup has form $H/\langle c\rangle$ for $H$ a subgroup of $G$ containing $\langle c\rangle$ by the correspondence theorem. Then
$$
|H|=[H:\langle c\rangle]|\langle c\rangle|=p^{k-1}p=p^k.
$$
A: I will show that there is a subgroup of G order $p^{n-1}$.
By the class formula, we know that $|Z(G)|>1$. I will prove that this s true by induction on the order of the group. The base is easy to verify. Step: Let $|G|=p^n$,$G/Z(G)=p^m$. The group $G/Z(G)$ is a group of order $p^{n-m}$. If $n=m$, then we know that $G$ is abelian and the result is easy to show. Assume WLOG that $m<n$. Since $n-m<n$, we know that $G/Z(G)$ has a subgroup $H$ of order $p^{n-m-1}$. Finally, verfiy that $\{x\in G|xZ(G)\in H\}$ is a subgroup of order $p^{n-1}$ 
Because of the previous result, if you have a subgroup of G of order $p^{n-1}$ then you have a subgroup of this subgroup of order $p^{n-1-1}=p^{n-2}$ and so on.
A: (Approach modified in light of Don Antonio's comment below question). Another way to proceed, which may not be so common in textbooks, and which produces a normal subgroup of each possible index, is as follows. Suppose we have a non-trivial normal subgroup $Q$ of $P$ (possibly $Q = P$). We will produce a normal subgroup $R$ of $P$ with $[Q:R] = p.$ Note that $P$ permutes the maximal subgroups of $Q$ by conjugation. Let $\Phi(Q)$ denote the intersection of the maximal subgroups of $Q$, and suppose that $[Q:\Phi(Q)] = p^{s}.$ Then $Q/\Phi(Q)$ is Abelian of exponent $p$. All its maximal subgroups have index $p,$ and there are $\frac{p^{s}-1}{p-1}$ of them. There is  bijection between the set of maximal subgroups of $Q$ and the set of maximal subgroups of $Q/\Phi(Q).$ Hence the number of maximal subgroups of $Q$ is $1 + p + \ldots + p^{s-1},$ which is congruent to $1$ (mod $p$), and each of them has index $p$ in $Q$. The maximal subgroups of $Q$ are permuted under conjugation by $P$ in orbits of $p$-power lengths.
At least one orbit must have length $1$. This orbit contains a subgroup $R$ of $Q$ with $[Q:R]= p$ and $x^{-1}Rx = R$ for all $x \in P.$ In other words, we have found a normal subgroup $R$ of $P$ which is contained in $Q$ and satisfies $[Q:R] = p .$
