I've copied over this question from [what I asked on StackExchange](https://math.stackexchange.com/questions/4412970/if-k-rtimes-mathbbz-is-a-finitely-generated-group-but-k-isnt-must-the-f), in the hope that an expert here can readily answer the question.


Is there an example of a group $G=K\rtimes \mathbb{Z}$ satisfying the following three conditions?


* $G$ is finitely generated;
* $K$ is **not** finitely generated;
* the fixed points of $\phi(1)$, which is the automorphism on $K$ corresponding to $1\_\mathbb{Z}$, are **not** a finitely generated group.


I suspect there is an example, but I don't have enough experience with infinite groups to come up with one right away.


$\\\\$


One idea, which may or may not work:


finding matrices $M\_1,\ldots,M\_k\in\text{GL}\_n(\mathbb{C})$ and $g\in\text{GL}\_n(\mathbb{C})$


such that $S=\langle g^{-n}\,M\_j\,g^n\rangle\_{1\leq j\leq k,\;n\in\mathbb{Z}} $ is not finitely generated


but such that $g$ commutes with surprisingly many matrices in $S$.



If $K\rtimes \mathbb{Z}$ is a finitely generated group but $K$ isn't, must the fixed points of $1_\mathbb{Z}$ be a finitely generated group?
No. Fix $p\ge 2$. Take the group
$$G=\{M(x,y,z;n):(x,y,z)\in\mathbf{Z}[1/p],n\in\mathbf{Z}\}$$where $$M(x,y,z;n)=\begin{pmatrix}1 & x & z \\ 0 & p^n & y\\ 0 & 0 & 1\end{pmatrix}$$


and $K$ the set of such $M(x,y,z;n)$ for $n=0$, and identify $\mathbf{Z}$ to powers of $M(0,0,0,1)$.


Then $G$ is finitely generated (namely by $\{M(0,0,0;1),M(1,0,0;0),M(0,1,0;0)\}$), $K$ is not finitely generated, and indeed the centralizer of $M(0,0,0;1)$ in $K$ is not finitely generated (isomorphic to the abelian group $\mathbf{Z}[1/p]$).


