If $ |G|=2 p$ then either $G$ is cyclic or $G \cong D_{2\cdot p}$ I'm studying for my Groups and Rings exam and I came up with this exercise which I'm having some struggle with:
Let $G$ be a finite group of order $2 p$ ($p>2$ with $p$ prime). Proof that either $G$ is a cyclic group or $G$ is isomorphic to the dihedral group $D_{2 \cdot p}$.
I tried to prove it with the Sylow theorems and looking at the possible $p$ values. Any hints? Thanks!
 A: Here is an argument that only uses Cauchy's theorem (but can probably avoid it as well):
Let $a$ be an element of order $2$ and $b$ be an element of order $p$.
Then the elements of $G$ are $1,b,\dots,b^{p-1},a,ab,\dots,ab^{p-1}$.
If $ba=ab$, then $ab$ has order at most $2p$ but not $1,2,p$ and so $G$ is cyclic generated by $ab$.
If $ba\ne ab$, then $ab$ cannot be a power of $b$ because $a \notin \langle b \rangle$. Therefore, $ab$ has order $2$. Thus, $G$ has presentation
$\langle a, b \mid a^2= b^p = (ab)^2 = 1 \rangle$ and is the dihedral group $D_{2p}$.
Perhaps this is a simpler argument:


*

*If the order of $ab$ is $2p$, then $G$ is cyclic.

*If the order of $ab$ is $1$ or $p$, then $ab \in \langle b \rangle$, and so $a \in \langle b \rangle$, which is false.
Therefore, the order of $ab$ is $2$ and the rest follows as above.
A: Here's how I would argue:
By Cauchy's Theorem, G has an element $a$ of order p, generating a cyclic subgroup H of G (of order p).  Similarly, G has an element $b$ of order 2 generating a cyclic subgroup K of order 2.  Note that H is normal in G, being of index 2.  It follows that conjugation of H by $b$ yields an automorphism $\phi$ of H.  Hence G is the semi-direct product of H by K with homomorphism from K to Aut(H) given by [1->Id, $b$->$\phi$].  It is only necessary now to determine the possibilities for what $\phi$ can be.
We have the following presentation for G: $a^p$ = 1, $b^2$ = 1, $b^{-1}ab$ = $a^i$ for some $i$ (the last equation following from normality of H).  What can $i$ be?  Since $b^2$ = 1, it follows that $a$ = $b^{-2}ab^2$ = $b^{-1}(b^{-1}ab)b$ = $b^{-1}(a^i)b$ = $(b^{-1}ab)^i$ = $(a^i)^i$ = $a^{i^2}$, or $a^{i^2-1}$ = 1.  Therefore p | $(i^2-1)$ = $(i-1)(i+1)$.  By primality, p | $(i-1)$ or p | $(i+1)$, i.e $i$ = 1 (mod p) or $i$ = -1 (mod p).  The case $i$=1 yields $b^{-1}ab$ = $a$, i.e $ab$ = $ba$; the semi-direct product is now seen to be a direct product, G = $C_p$ x $C_2$ = $C_{2p}$.  The case $i$ = -1 yields $b^{-1}ab$ = $a^{-1}$; this is the equation for $D_p$.
