Generalized identities of (soluble) groups Let $G$ be a group.  Let us say that $G$ satisfies a generalized identity of degree $n$ if there exist $a_1,a_2,\dots a_n \in G$ such that 
$$x^{a_1}x^{a_2}\dots x^{a_n}=1,$$
for all $x\in G$.


*

*Assume that $G$ has order $pq$, where $p\neq q$ are primes.  Can $G$ satisfy a generalized identity of degree $p$?


If such a $G$ exist, then clearly $q$ should be greater than $p$. Less trivial, $q \mod p$ should not generate $\mathbb{Z}_p^{\times}$.


*A finitely generated soluble group which satisfies a generalized identity of an arbitrary degree $n$ is not necessarily finite (the infinite dihedral group satisfies an identity of degree $4$).  More generally, there is an infinite f.g metabelian group which satisfies a generalized identity of degree $n^2$, for any integer $n\geq 2$.


Determine all the integers $n$, such that every f.g soluble group which satisfies a generalized identity of degree $n$ is finite.
(The set of these integers contains $2$ and $3$. And it contains all the primes if the first question has a negative answer. If I'm not mistaken, this set contains all the primes if one replaces "soluble" by "metabelian").
 A: Assume $G=\langle a,b:a^p=b^q=1,a^b=a^\lambda\rangle$ is a non-abelian group of order $pq$ ($p>q$). Suppose $G$ satisfies the following generalized identity of degree $k$,
\begin{equation}
x^{g_1}\cdots x^{g_k}=1.\quad(*)
\end{equation}
Taking modulo $G'$, one observe that $k$ is a multiple of $q$. Now, assume $g_i=a^{m_i}b^{n_i}$ for $i=1,\ldots,k$. From the above identity for $x=(b^j)^{a^i}$ ($j\neq0$), we obtain
\begin{equation}
(i+m_1)\lambda^{(k-1)j+n_1}+\cdots+(i+m_k)\lambda^{0j+n_k}\equiv0\pmod p.
\end{equation}
Hence, the following matrix equation arises by putting $j=1,\ldots,q-1$ in the above equation
\begin{equation}
\begin{bmatrix}
\lambda^{k-1}&\cdots&\lambda&1\\
\lambda^{2(k-1)}&\cdots&\lambda^2&1\\
\vdots&\ddots&\vdots&\vdots\\
\lambda^{(q-1)(k-1)}&\cdots&\lambda^{q-1}&1\\
\end{bmatrix}
\begin{bmatrix}
(i+m_1)\lambda^{n_1}\\
(i+m_2)\lambda^{n_2}\\
\vdots\\
(i+m_k)\lambda^{n_k}\\
\end{bmatrix}
\equiv0\pmod p.
\end{equation}
The null space of the left Vandermonde-like matrix is $k-q+1$. If $\#\{m_1,\ldots,m_k\}>1$, then the right column matrices generate a null-space of dimension at least two so that $k-q+1\geq2$ whence $k>q$. In case $\#\{m_1,\ldots,m_k\}=1$ we obtain
\begin{equation}
\begin{bmatrix}
\lambda^{k-1}&\cdots&\lambda&1\\
\lambda^{2(k-1)}&\cdots&\lambda^2&1\\
\vdots&\ddots&\vdots&\vdots\\
\lambda^{(q-1)(k-1)}&\cdots&\lambda^{q-1}&1\\
\end{bmatrix}
\begin{bmatrix}
\lambda^{n_1}\\
\lambda^{n_2}\\
\vdots\\
\lambda^{n_k}\\
\end{bmatrix}
\equiv0\pmod p.
\end{equation}
On the other hand, since $x=a$ satisfies the identity $(*)$, we get $\lambda^{n_1}+\cdots+\lambda^{n_k}\equiv0\pmod p$, from which together with the above matrix equation, it yields
\begin{equation}
\begin{bmatrix}
1&\cdots&1&1\\
\lambda^{k-1}&\cdots&\lambda&1\\
\vdots&\ddots&\vdots&\vdots\\
\lambda^{(q-1)(k-1)}&\cdots&\lambda^{q-1}&1\\
\end{bmatrix}
\begin{bmatrix}
\lambda^{n_1}\\
\lambda^{n_2}\\
\vdots\\
\lambda^{n_k}\\
\end{bmatrix}
\equiv0\pmod p.
\end{equation}
The left hand side matrix is a Vandermonde matrix when $k=q$. Being non-invertible, it follows that $k>q$ in this case too. Therefore, we must have $k\geq2q$.
For $q=2$ we have $k=4$ since 
\begin{equation}
xx^ax^{ba}x^b=1
\end{equation}
for all $x\in G$. It is not difficult to see that for $q=3$ we have $k=9$ and
\begin{equation}
xx^bx^{b^2}x^{ba}x^{b^2a}x^ax^{b^2a^2}x^{a^2}x^{ba^2}=1
\end{equation}
for all $x\in G$. In general, if $\pi=(0\ 1\ \cdots\ q-1)$, then
\begin{equation}
(x^{b^{\pi^0(0)}a^0}\cdots x^{b^{\pi^0(q-1)}a^0})\cdots(x^{b^{\pi^{q-1}(0)}a^{q-1}}\cdots x^{b^{\pi^{q-1}(q-1)}a^{q-1}})=1
\end{equation}
for all $x\in G$ so that $k\leq q^2$. I believe $k=q^2$.
