Group with exactly two subgroups of index 2 I am looking for a group $G$ such that $G$ has exactly two subgroups of index 2.


I have searched by GAP but I couldn't find it.
Such a group does not exist. Suppose the group $G$ has subgroups $N \ne M$ of index two. Clearly they are both normal, and $M N = G$. Then
$$
\lvert G : M \cap N \rvert 
=
\lvert G : M \rvert 
\cdot
\lvert M : M \cap N \rvert 
=
\lvert G : M \rvert 
\cdot
\lvert M N : N \rvert 
=
\lvert G : M \rvert
\cdot 
\lvert G : N \rvert
=
4.
$$
So $G / M \cap N$ is a group of order $4$, which is isomorphic to the Klein four-group $V$, as $a^{2} \in M \cap N$ for each $a \in G$.

Since $V$ has three subgroups of index $2$, $G$ has at least three such subgroups, by the correspondence theorem.
$G=S_3\times S_3$ would work. The subgroups of index two being $\mathbb{Z}_3\times S_3$ and $S_3\times\mathbb{Z}_3$.

Edit: Removed last sentence due to an error pointed out by Tobias Kildetoft.

Edit: $G$ is not an example of such a group as Andreas Caranti points out.