Prove that $A_p$ has a subgroup of order 2p if and only if $p \equiv 1 \pmod 4$ Let p be an odd prime. Prove that $A_p$ has a subgroup of order 2p if and only if $p \equiv 1 \pmod 4$
I have that if p is an odd prime and G is of order 2p, then either $G \cong C_{2p}$ or $G \cong D_p$, but I am not exactly sure how to use this.
If I assume that $A_p$ has a subgroup of order 2p, then I know that $C_{2p} \leq A_p$ or $D_p \leq A_p$.
Also since there exists a subgroup of order 2p,  $2p \vert \frac{p!}{2} \Rightarrow 4 \vert p! \Rightarrow  4 \vert (p-1)!$
Is this correct so far?
 A: $S_n$ acts on a polygon with $n$ labelled vertices, so $A_p$ will act on a $p$-gon as well. Now $D_p$ will be a subgroup of $S_p$ naturally; to see if it's a subgroup of $A_p$ we must check if its elements are even, which means we need only check if a pair of generators (one rotation and one flip) are even as permutations. A rotation is $(123\cdots p)$ and one of the flips is $(2~p)(3~p-1)\cdots(\tfrac{p+1}{2}~\tfrac{p+3}{2})$, as we know $p$ is odd. The rotation is even. How many cycles are in the flip?
Now for when $p\equiv3~(4)$. Consider two cases: first, an element of order $2p$. The lcm of the cycles in its disjoint cycle representation have lcm = $2p$, so either it has only a $p$-cycle and $2$-cycles (the number of which doubles to $p$, impossible) or the element is itself a $2p$-cycle (impossible). Second case: an element $\pi$ of order $p$ and an involution $\sigma$ such that $\langle\pi,\sigma\rangle\cong D_p$, or equivalently (via the theory of group presentations) $\sigma \pi\sigma^{-1}=\pi^{-1}$. Show $\pi=(12\cdots p)$ can be assumed wlog, then consider the fact that $\sigma \pi\sigma^{-1}=(\sigma(1)\sigma(2)\cdots\sigma(p))$; how many $2$-cycles is $\sigma$ a product of and thus for which $p$ is $\sigma$ even?
