relatively free groups in $Var(S_3)$ Suppose $S_3$ is the symmetric group of order 6. Which elements of the variety $Var(S_3)$ are relatively free? 
This question is related to my previous question
Relatively free algebras in a variety generated by a single algebra
 A: The relatively free group $F_{var(G)}(x_1,\dots,x_n)$ is isomorphic to the group of all polynomial functions $G^n\to G$, where  a function is called polynomial if it can be expressed via the multiplication and inverses of its arguments; the polynomial functions form a group with respect to the pointwise multiplication.  
$F_{var(S_3)}(x,y)$ is not $S_3\times S_3\times C_6$ because the latter group is not two-generated (since it maps onto the elementary abelian group of order 8).

Edit.
Theorem.
The group $F$ of polynomial functions $G^n\to G$ is the relatively free group in $var(G)$ of rank $n$.  A free basis of $F$ consists of the functions $f_1(x_1,\dots,x_n)=x_1,\dots,f_n(x_1,\dots,x_n)=x_n$.
Proof.
Clearly, $F\in var(G)$.
Suppose that we have a relation $w(f_1,\dots,f_n)=1$ in $F$. By definition, this means that the the function the fuction $G^n\to G$ sending $(g_1,\dots,g_n)$ to $w(g_1,\dots,g_n)$ is the constant function identitically equal to 1. Thus, $w(x_1,\dots,x_n)=1$ is an identity (law) in the group $G$. This completes the proof.
Example.
The rank-one group $F_{var(S_3)}(x)$ consists of the following 6 functions
from $S_3$ to $S_3$:
$$
x\mapsto 1,\ 
x\mapsto x,\ 
x\mapsto x^2,\
x\mapsto x^3,\   
x\mapsto x^4,\
x\mapsto x^5. 
$$
Note that, according to the definition above, we cannot use constants in formulas for polynomial functions; so, for instance, the function 
$x\mapsto (12)x$ is not polynomial.    
Similarly, the $F_{var(S_3)}(x,y)=\{1,x,y,xy,x^2y,\dots\}$ but I do not know how many different polynomyal functions is there and so I do knot know the order of this group (though this is a question of direct calculation).
A: Let me provide by hand free groups in the variety $V_p$ generated by the dihedral group $D_{2p}$ of order $2p$, $p$ odd prime.
First observe that $D_{2p}$ satisfies the group identities $x^{2p}=1$, $[x^2,y^2]=1$.
In any group, let $G^2$ be the set of squares and $G_p$ the set of elements of order dividing $p$. For any group, $G_p\subset G^2$. For $G$ satisfying the identity $x^{2p}=1$, we have the reverse inclusion, and hence $G_p=G_2$.
In addition, the identity $[x^2,y^2]=1$ implies that for $G\in G_p$, any product of squares belongs to $G_p$, so the subgroup generated by $G^2(=G_p)$ is contained in $G_p$. This means that $G_p$ is a subgroup, obviously a normal elementary abelian $p$-subgroup. Since $G_p=G^2$, $G/G^2$ is a 2-group. If $G$ is finite, we deduce that $G=G_p\rtimes Q$, where $Q$ is any 2-Sylow subgroup, and $Q$ is elementary abelian (say of order $2^k$); for convenience write $Q=Q_k$.
The irreducible $\mathbf{F}_p[Q_k]$-modules are all 1-dimensional, given by the $2^k$ homomorphisms $\chi:Q\to C_2$; denote it by $V_\chi$. So we can write $G_p=\bigoplus_{\chi\in\mathrm{Hom}(Q,C_2)}V_\chi^{n_\chi}$.
Now let $G=G(k)$ be the free group of rank $k$ in this variety. Clearly $G/G^2$ is isomorphic to $Q_k$, so it remains to determine the multiplicities $n_\chi=n_\chi(k)$. The abelianization of $G(k)$ being isomorphic to $C_{2p}^k$, we have $n_0(k)=k$. We have a canonical homomorphism $\mathrm{Aut}(G)\to\mathrm{Aut}(Q_k)\simeq\mathrm{GL}_k(\mathbf{F}_2)$. It is surjective: indeed if $(x_1,\dots,x_k)$ is a basis of $G$, then mapping $x_i$ to $x_ix_j$ ($i\neq j$ fixed) and fixing all other basis elements, induces the corresponding elementary matrix, and these generate $\mathrm{GL}_k(\mathbf{F}_2)=\mathrm{SL}_k(\mathbf{F}_2)$. It follows that all $n_\chi(k)$, for $\chi\neq 0$, are equal, say to some number $n(k)$, to determine.
First, we have $n(k)<k$ for all $k\ge 1$. To show this, fix $\chi\neq 0$, and we have to check that $V_\chi^k\rtimes Q_k$ is not generated by $k$ elements. Modding out by the kernel of $\chi$, this amounts to showing it when $k=1$, i.e., $\mathbf{F}_p^k\rtimes_{\pm}C_2$ is not $k$-generated. Indeed, consider $k$ generators $u_1,\dots,u_k$. We can suppose that $u_1\notin \mathbf{F}_p^k$. Then, replacing $u_i$ with $u_iu_1$, we can suppose that $u_1\in \mathbf{F}_p^k$ for all $k\ge 2$. Then, for if $k\ge 2$, modding out by the subgroup generated by $u_k$ (which is normal) shows that $\mathbf{F}_p^{k-1}\rtimes_{\pm}C_2$ is $(k-1)$-generated. We can continue until $k=1$ and deduce that $\mathbf{F}_p\rtimes_{\pm}C_2$ is 1-generated, which is a contradiction since it is not abelian.
Now I claim that $n(k)=k-1$. That is,

the free group $G(k)$ on $k$-generators in the variety $V_k$ is isomorphic to $((\bigoplus_{\chi\neq 0}V_\chi^{k-1})\oplus V_0^k)\rtimes Q_k$, where $Q_k\simeq C_2^k$, and where $\chi$ is meant to range over $\mathrm{Hom}(Q_k,C_2)$, and $V_\chi$ is $\mathbf{F}_p$ endowed with the action $q\cdot v=\chi(q)v$ of $Q_k$.

Given the above, it remains (a) to prove that this group is $k$-generated, which implies that $G(k)$ is indeed free in the variety generated by the identities $x^{2p}$ and $[x^2,y^2]$, and that $G(k)$ indeed belongs to the variety generated by $D_{2p}$.
(b) is easy: indeed, given any nontrivial $g$ element of $G(k)$, we have to find a homomorphism $G(k)\to D_{2p}$ such that $g$ is not in the kernel. If $g$ does not belong to $G(k)_p$, this is clear (map onto $Q_k$, and then to an element of order 2). Otherwise there exists a quotient of $G(k)$ of the form $V_\chi\rtimes Q_k$, and killing the kernel of $\chi$, we get, if $\chi\neq 0$ $V_\chi\rtimes C_2\simeq D_{2p}$, and if $\chi=0$ we get $V_0\simeq C_p$. 
(a)
(1) $H_\chi:=V_\chi^{k-1}\rtimes Q_k$ is $k$-generated, by some $k$-tuple mapping onto the canonical basis of $Q_k=C_2^k$. First suppose that $\chi$ is the $k$-projection. Then this writes as $C_2^{k-1}\times(\mathbf{F}_p^{k-1}\rtimes_{\pm} C_2)$, which is generated by $(s_1q_1,s_2q_1,\dots,s_{k-1}q_{k-1},q_k)$, where $(s_i)$ is the canonical basis of $\mathbf{F}_p^{k-1}$ and $(q_i)$ is the canonical basis of $C_2^k$. In general, this yields a generating $k$-tuple mapping onto some basis of $C_2^k$ (usually not the original basis). Using elementary operation, we deduce a generating $k$-tuple of $H_\chi$ mapping exactly onto the canonical basis of $C_2^k$.
(2) $V_0^k\rtimes Q_k$ has the same property: this is obvious since it is isomorphic to $C_{2p}^k$.
We can conclude. For every $\chi$, we have a generating subset of $V_\chi^{n_\chi}$ of the form $((v_{\chi 1},q_1),\dots,(v_{\chi,k},q_k))$. Write $v_i=(v_{\chi,i})_\chi\in V=\bigoplus_\chi V_\chi^{n_\chi}$. I claim that $(v_1q_1,\dots,v_kq_k)$ generates $V\rtimes Q_k$. Since $(v_iq_i)^p=q_i$, the subgroup it generates contains $Q_k$, hence has the form $V'\rtimes Q_k$ with $V'$ some $Q_k$-submodule. Since $V'$ maps onto each isotypic component $V_\chi^{n_\chi}$, we have $V'=V$.
So $G(k)\simeq (\bigoplus_{\chi\neq 0}V_\chi^{k-1}\oplus V_0^k)\rtimes Q_k$. 
Note: Since $\bigoplus_\chi V_\chi$ is isomorphic to the regular representation $R_k$ (of $Q_k$ over $\mathbf{F}_p$), this can be rewritten as $(R_k^{k-1}\oplus V_0)\rtimes Q_k$ (which has order $p^{(k-1)2^k+1}2^k$). This confirms Keith Kearnes's conjecture, which motivated this additional answer.
A: This question recently popped up on the front page,
so I entered $S_3$ in UACalc, and calculated
the $2$-generated relatively free group
$F_{S_3}(x,y)$. UACalc informed me that the order of this
group is $972=2^2\cdot 3^5$. (It gave me the multiplication
table too, but it was too big to be of much use to me.)
I then worked out the internal structure of the group,
using UACalc to check my intermediate calculations.
Next, I followed the zentralblatt link given in
Keith Dennis's answer, to see if what I'd done could
be found in Kovacs' paper. That paper predicts
the order of $F_{S_3}(x,y)$ to be $6377292 = 2^2\cdot 3^{13}$,
not $972$.
I started snooping around with google, and found a copy
of Kovacs' paper on his website with a red marginal comment saying that
his original formula is wrong. The marginal comment explains
how the formula should be modified, but unfortunately
the margin was too small to contain the proof of the correction.
Luckily for me, the corrected formula gives $972$ for the order of this group.
So, if you are interested in this problem, don't use the formula
in Kovacs' paper, but get the copy from his website.

Let me make a conjecture about the structure of $F_{S_3}(n)$.
I have verified this conjecture by hand + computer
for $n =1, 2$, and it is
consistent with Kovacs' corrected formula for all $n$.
Moreover, the conjecture is so simple,
that if someone pokes at it enough they will likely 
find a proof or disproof.
Let $\mathbb F_3$ be the $3$-element field and let
$R = \mathbb F_3[\oplus^n \mathbb Z_2]$ be the group ring
with coefficients in $\mathbb F_3$
of the rank $n$ free group, $\oplus^n \mathbb Z_2$,
in the variety ${\mathcal V}(\mathbb Z_2)$ of elementary
$2$-abelian groups.
Let $V=\left(\oplus^{n-1} R\right)\oplus \mathbb F_3$
be the $R$-module that is a direct sum of
$n-1$ copies of the regular representation of
$\oplus^n \mathbb Z_2$ over $\mathbb F_3$ along with one
extra copy of the trivial representation.
Additively $V$ is an elementary abelian $3$-group,
but as an $R$-module it comes equipped with an action
of $\oplus^n \mathbb Z_2$ by automorphisms.
The conjecture is that the resulting semidirect
product $V\rtimes (\oplus^n \mathbb Z_2)$
is $F_{S_3}(n)$.
You can see from the description that the $\mathbb F_3$-dimension
of $V$ is $(n-1)2^n+1$, and so the group has order
$2^n\cdot 3^{(n-1)2^n+1}$. This is the modified Kovacs formula
for the variety ${\mathcal V}(S_3)$.
If the group I describe is $n$-generated, and if the
modified Kovacs formula is correct, then the conjecture
is true. I also note that the group I construct has the correct
isomorphism type of its center and its quotient modulo its commutator subgroup.
A: See
Kovács, L. G., Free groups in a dihedral variety, Proc. R. Ir. Acad., Sect. A 89, No. 1, 115-117 (1989). ZBL0697.20012.
