Solution (source code)

= Solution

First prove the <primitive three-cycle criterion> directly. The useful generation fact is that adding a <three-cycle> whose support meets a set $S$, with $|S|\geq3$, to the <alternating group> $A_S$ generates the <alternating group> on the enlarged set. If the support is $\{a,b,x\}$ with $a,b\in S$ and $x\notin S$, <conjugation> by $A_S$ and taking inverses produces every <three-cycle> with $x$ and two points of $S$. For $|S|\geq4$ this uses <two-transitivity> of $A_S$; for $|S|=3$, its cyclic action on pairs together with inversion gives both pair orientations. These cycles, together with the cycles supported inside $S$, are all the <three-cycles> on $S\cup\{x\}$ and generate $A_{S\cup\{x\}}$. Every even <permutation> is a product of <three-cycles>: pair its transpositions, and use $(a\,b)(b\,c)=(a\,b\,c)$ and $(a\,b)(c\,d)=(a\,c\,b)(a\,c\,d)$, with rightmost factors acting first.

If instead the new support is $\{a,x,y\}$ with just $a\in S$, choose $b\in S\setminus\{a\}$ and conjugate $(a\,x\,y)$ by an element of $A_S$ carrying $a$ to $b$. This gives $(b\,x\,y)$, and
$$
(a\,x\,y)(b\,x\,y)^{-1}=(a\,x\,b).
$$
The two-point-overlap case first adjoins $x$; the original cycle then adjoins $y$. This proves <connected triple supports generate an alternating group> by successively adjoining intersecting supports.

Now take the supports of every conjugate in $G$ of a given <three-cycle>, and make these triples the edges of a <hypergraph> on the <permutation> domain. Its connected components are permuted by $G$, so they form a <block system>. Since at least one component contains three points, <primitivity> forces the single component to be the entire domain. Start with one triple and adjoin intersecting triples until all points have been reached. The generation argument shows that the <subgroup> generated by the conjugate cycles is $A_n$. Hence
$$
\boxed{A_n\leq G.}
$$

To classify the proper <maximal subgroups> containing a <three-cycle>, distinguish the three possible types of action. A <primitive> <maximal subgroup> contains $A_n$, and thus equals $A_n$, since $[S_n:A_n]=2$. An intransitive <maximal subgroup> lies in the full stabilizer $S_k\times S_{n-k}$ of one of its orbits, and maximality makes it that full stabilizer. When $k=n-k$, this stabilizer lies properly inside the <subgroup> that can interchange the two parts, so it is not maximal. Take the smaller part to obtain $1\leq k<n/2$. Such an unequal-part stabilizer is maximal: its transpositions connect all points within each part, and any element outside it carries at least one within-part transposition to a cross-part transposition. The resulting connected graph of transpositions generates $S_n$. To see that last assertion, transpositions along a path generate the transposition of its endpoints by successive conjugations. The stabilizer contains a <three-cycle> exactly when $n-k\geq3$.

A transitive imprimitive <maximal subgroup> preserves a nontrivial partition into $b$ blocks of size $a$, with $n=ab$. It equals the full <permutation wreath product> $S_a\wr S_b$. This full block stabilizer is maximal: any <permutation> not preserving the partition sends some same-block pair to a different-block pair, giving a cross-block transposition by <conjugation>. The block stabilizer is transitive on cross-block pairs, so all cross-block transpositions follow; together with its within-block transpositions they generate $S_n$. A <three-cycle> in this <group> must act trivially on the blocks, since any nontrivial block <permutation> moves at least two entire blocks, and a block three-cycle moves $3a$ points. Thus a single <three-cycle> exists exactly when $a\geq3$. The full classification, up to <conjugation>, is therefore
$$
\boxed{A_n;\quad S_k\times S_{n-k}\ (1\leq k<n/2,\ n-k\geq3);\quad S_a\wr S_b\ (n=ab,\ a\geq3,\ b\geq2).}
$$
This is the <maximal symmetric-group subgroups containing a three-cycle> classification. For $n<3$ there are no such <subgroups>.

For the first family of counterexamples to extending the criterion to longer cycles, let $G=PSL_2(p)$ act on the <projective line> $\mathbb F_p\cup\{\infty\}$. The determinant-one <matrices>
$$
\begin{pmatrix}1&1\\0&1\end{pmatrix},\qquad
\begin{pmatrix}0&-1\\1&0\end{pmatrix}
$$
act respectively as $x\mapsto x+1$ and $x\mapsto-1/x$. The first fixes infinity and is one $p$-cycle on the finite points. Its translations make the infinity stabilizer transitive on the other points; the second moves infinity, so the full action is <two-transitive>, hence <primitive>. The action is faithful after quotienting by scalar <matrices>. Counting a nonzero first column and the $p$ second columns with determinant one gives $|SL_2(p)|=p(p^2-1)$, and the scalar <group center> has order two. Thus
$$
|PSL_2(p)|=\frac{p(p^2-1)}2<\frac{(p+1)!}2=|A_{p+1}|\qquad(p>3),
$$
since the ratio on the right to the left is $(p-2)!>1$. Consequently \b[$PSL_2(p)$ is the required example for every prime $p>3$].

For the final example take $p=59$, and let the <direct product of groups> $A_5\times A_5$ act on the sixty elements of $A_5$ by
$$
(x,y):t\longmapsto xty^{-1}.
$$
The action is transitive and the stabilizer of the identity is the diagonal <subgroup> $\Delta=\{(z,z):z\in A_5\}$. To prove that the diagonal is a <maximal subgroup>, no classification theorem is needed. If $\Delta<K\leq A_5\times A_5$, choose $(x,y)\in K\setminus\Delta$. Multiplying by $(y^{-1},y^{-1})$ gives $(xy^{-1},1)\in K$ with $xy^{-1}\ne1$. The <subgroup> $L=\{z:(z,1)\in K\}$ is normal in $A_5$, by diagonal <conjugation>, and is nontrivial. Simplicity of $A_5$ gives $L=A_5$, and then $K=A_5\times A_5$. Thus the <coset> action is <primitive>. It is also faithful: if $xty^{-1}=t$ for every $t$, then $x=y$ by taking $t=1$, and $x$ is central in the centerless <simple group> $A_5$, so $x=y=1$. Finally,
$$
\boxed{n=60=59+1,\qquad |G|=60^2=3600,\qquad59\nmid |G|.}
$$
The prime $59$ is odd, and its primality follows by testing the primes $2,3,5,7$, the only ones below its square root. This is a faithful <diagonal primitive permutation group> whose order is not divisible by the degree minus one.