Here is another example of a group with an almost square root. In a simple group $G$ of order 168 there exists a subset of 13 elements whose square is equal to $G$. We found several such subsets. Here is one of them. Let $G=PSL(3,2)=SL(3,2)={\rm gr\,}((4,6)(5,7),(1,2,4)(3,6,5))$. Then
$ A=\{ (1,2)(4,7),\ (1,4)(3,6),\ (1,2)(4,5,7,6),\ (1,2,3)(4,5,7),\ (1,2,3)(4,7,6),\\ (1,2,4,5,7,3,6),\ (1,2,4,7)(3,6),\ (1,2,6)(3,4,7),\ (1,2,6,3,4,5,7),\\ (1,5,2)(3,4,7),\ (1,5,2,3,6,4,7),\ (1,5,2,4,7,6,3),\ (1,5,2,6)(4,7) \} $
is an almost square root of $G$. We can use the following GAP commands to check this fact:
g:=PSL(3,2);
qr:=[ (1,2)(4,7), (1,4)(3,6), (1,2)(4,5,7,6), (1,2,3)(4,5,7), (1,2,3)(4,7,6), (1,2,4,5,7,3,6), (1,2,4,7)(3,6), (1,2,6)(3,4,7), (1,2,6,3,4,5,7), (1,5,2)(3,4,7), (1,5,2,3,6,4,7), (1,5,2,4,7,6,3), (1,5,2,6)(4,7)];;
prod:=[];; for a in qr do for b in qr do Add(prod,a*b);od;od;
Size(AsSet(prod));
Briefly, our recursive algorithm uses the function $F(A)$:
We start the computation from a set $A$ consisting of two elements of order 2.
Suppose we have already computed a set $A$ such that $|A^2|\geq|A|^2-1$.
We compute the set of candidates $C$ by the rule
$C=G\setminus(A^{-1}A^2\cup A^2A^{-1}\cup N_G(A)\cup S(A))$,
where $N_G(A)=\{x\in G\,\mid\,x^{-1}Ax\cap A\neq\emptyset \}$ and $S(A)=\{x\in G\,\mid\,x^2\in A^2\}$.
- After that, for each $x\in C$ we compute $A'=\{A,x\}$ and run $F(A')$.
Note that, there are actually exactly three (up to conjugacy) pairs of elements of order 2 in the group $G$: $(12)(47),\ (15)(26)$; $(12)(47),\ (14)(36)$; $(12)(47),\ (13)(46)$.