How to prove: if $G$ finite, $P$ a subgroup or order $p$ and $P = C_G(P)$ then $P$ is a Sylow $p$-subgroup of $G$ I can't seem to make progress on proving the following: if $G$ finite, $P < G$ a subgroup of order $p$ and $P = C_G(P)$ then $P$ is a Sylow $p$-subgroup of $G$. $C_G(P)$ is the centralizer of $P$ in $G$, i.e. the set $\{a \in G : ax=xa \ \forall x \in P\}$.
My work so far: Since $P = C_G(P)$ then $P$ abelian. I think to show $P$ is a Sylow p-subgroup we need to show that if $|G| =mp^n$ for some $m$ coprime to $p$ and $n > 0$, then $n = 1$ (so $P$ has maximal order). There should also exist $Q$ a Sylow p-subgroup of $G$ such that $P < Q$. If we can show $P = Q$ then we are done.
I suspected a counting argument using the class equation: $|G| = |Z(G)| + \sum[G:C_G(x_i)]$ where $x_i \in G \setminus Z(G)$. If $x_i \in P$ then $P = C_G(P) \subset C_G(x_i)$ so $p$ divides $|C_G(x_i)| = p^{k_i}$ for $1 \le k_i \le n$. Then 
\begin{align}
|G| &= |Z(G)| + \sum[G:C_G(x_i)] \\
mp^n &=|Z(G)| + |G\setminus Z(G)|p^{k_i}.
\end{align}
I'm not sure if I'm heading in the right direction since I don't see where we would even get a contradiction here. Thanks for any feedback.
 A: As you say, let $Q$ be a $p$-Sylow with $P\le Q$.  Applying the class equation to $Q$ shows that $Q$ has a non-trivial center, since all non-central elements have class sizes divisible by $p$, so $|Z(Q)|=1$ would imply $p$ divides $p^n-1$, which is absurd.  Since $P=C_G(P)$ and since $Z(Q)$ centralizes $P$, we must have $Z(Q)\le P$ and thus $Z(Q)=P$ since $P$ has order $p$ and $Z(Q)$ has order at least $p$.  But then $Q\le C_G(Z(Q))=C_G(P)=P$, so $Q\le P$.  Thus $P$ is a $p$-Sylow.
If you know the full statement of Sylow's theorem, there's an even shorter proof: Since the full theorem states that any $p$-subgroup that is not Sylow is an index $p$-subgroup of some other subgroup, then if $P$ is not Sylow, $P<R$ with $|R|=p^2$.  But every group of order $p^2$ is abelian and thus $R$ centralizes $P$.  Contradiction.
A: I like the short proof of C Monsour, +1 from me. Here is another proof. Actually two of them. Observe that $N_G(P)/C_G(P)$ can be homomorphically embedded in $Aut(P)$. Since $P$ is cyclic of prime order $p$, $Aut(P) \cong C_{p-1}$, hence $p$ does not divide $|N_G(P):P|$.There are now at least two ways to finish the proof.
(i) Since $P$ is a $p$-group it must be contained in some $Q \in Syl_p(G)$, and assume $P \subsetneq Q$. Since normalizers grow (see for example I.M. Isaacs Finite Group Theory Theorem 1.22), we must have $P \subsetneq N_Q(P)$, whence there is a $x \in Q-P$ normalizing $P$. Now look at $\bar{x}$ as element of $N_G(P)/P$. $\bar{x}$ is a $p$-element (since $x \in Q$) and $p$ does not divide $|N_G(P)/P|$. Hence $\bar{x}=\bar{1}$, contradicting $x \notin P$. So $P=Q$.
(ii) In general, if $P$ is a $p$-subgroup of a group $G$, then $|G:P| \equiv |N_G(P):P|$ mod $p$ (for a proof: let $G$ act by left multiplication on the left cosets of $P$ in $G$, and apply the Orbit-Stabilizer counting theorem (or see here)). We already saw that $p \nmid |N_G(P):P|$, hence it follows that $p \nmid |G:P|$, meaning $P$ is Sylow.
