Isomorphism of $\mathbb{Z}\ltimes_A \mathbb{Z}^m$ and $\mathbb{Z}\ltimes_B \mathbb{Z}^m$ here it's a question that I've posted in MSE but unfortunately got no answers:
Let $A$ and $B$ be matrices of finite order with integer coefficients.
Let $n\in\mathbb{N}$ and let $G_A=\mathbb{Z}\ltimes_A \mathbb{Z}^n$ be the semidirect product, where the action is $\varphi(n)\cdot (m_1,\ldots,m_n)=A^n (m_1,\ldots,m_n)$, and similarly with $B$.
It is easy to construct an isomorphism between $G_A$ and $G_B$ if $A$ is conjugate in $\mathrm{GL}(n,\mathbb{Z})$ to $B$ or $B^{-1}$. 
But, this is also a necessary condition? I mean, does $G_A\cong G_B$ implies $A\cong B$ or $A\cong B^{-1}$ in $\mathrm{GL}(n,\mathbb{Z})$ or is there a counterexample?
I've seen at this MSE question that it is true if $A$ and $B$ are hyperbolic, i.e none of their eigenvalues have module 1, but it isn't the case.
Thank you very much!
 A: $\def\QQ{\mathbb{Q}}\def\ZZ{\mathbb{Z}}$I misread the question as asking about $C_m \ltimes_A \ZZ^n$ and $C_m \ltimes_B \ZZ^n$, where $m$ is the order of $A$ and $B$. If we work with $\ZZ \ltimes_A \ZZ^n$ and $\ZZ \ltimes_B \ZZ^n$, I'm not sure what happens.
Working with $C_m \ltimes_A \ZZ^n$, this is not true. Let $m$ be the order of $A$ and $B$, let $\zeta_m$ be a primitive $m$-th root of unity, let $K$ be the cylotomic field $\QQ(\zeta_m)$. Let $G$ be the Galois group of $K$ over $\QQ$, so $G \cong (\ZZ/m \ZZ)^{\times}$. Let $H$ be the class group of $K$. Suppose that $H$ contains a class $h$ whose $G$-orbit is larger than $h^{\pm 1}$; say $\sigma(h) \neq h^{\pm 1}$. 
Let $I$ be an ideal representing the class $h$, so $I$ is a free $\ZZ$-module of rank $\phi(m)$. Let $A$ be the matrix of multiplication by $\zeta_m$ on $I$, and let $B$ be the matrix of multiplication by $\zeta_m$ on $\sigma(I)$. Since $I^{\pm 1}$ and $\sigma(I)$ are not isomorphic as $\ZZ[\zeta_m]$ modules, $A^{\pm 1}$ and $B$ are not conjugate. 
However, $C_m \ltimes_A \ZZ^{\phi(m)} \cong \langle \zeta \rangle \ltimes I$ and $C_m \ltimes_B \ZZ^{\phi(m)} \cong \langle \zeta \rangle \ltimes \sigma(I)$, and these are isomorphic by $(\zeta^j, x) \mapsto (\sigma(\zeta)^j, \sigma(x))$. 
This occurs for $m=37$, where $H \cong \ZZ/37 \ZZ$. If I recall correctly, if $\sigma(\zeta) = \zeta^a$ then $\sigma(h) = h^{a^{21}}$. Since $\mathrm{GCD(21,36)} = 3$, the monomial $a^{21}$ takes $12$ different values modulo $37$ so, taking $h$ a generator of the class group, there are values of than $h^{\pm 1}$ in the $G$ orbit of $h$.
A: This is a complement to Johannes Hahn's answer.
Corrigendum. In the previous version of this answer, I have made an erroneous claim, allowing $\omega$, the order of $A$ and $B$, to be any positive number.
The claim below is valid only if $$\omega \in \{1, 2, 3, 4, 6 \},$$ which is sufficient to address OP's subsequent examples.
Following Johannes Hahn's approach, we can prove the following:

Claim. Assume that $G_A$ and $G_B$ are isomorphic. Then
$\begin{pmatrix} 1 & 0 \\  0 & A \end{pmatrix}$ is a conjugate of $\begin{pmatrix} 1 & 0 \\  0 & B \end{pmatrix}$ or $\begin{pmatrix} 1 & 0 \\  0 & B^{-1} \end{pmatrix}$  in $\text{GL}_{n + 1}(\mathbb{Z})$. In particular $A$ is a conjugate of $B$ or $B^{-1}$ in
$\text{GL}_{n}(\mathbb{Q})$.


Proof. Let $K_A$ be the centraliser of the derived subgroup
$G_A' = [G_A, G_A]$ of $G_A$. It is clearly a characteristic subgroup of $G_A$. Let $C_A$ be the infinite cyclic subgroup of $G_A$ generated by $a \Doteq (1, (0, \dots, 0))$. The conjugation by $a$, or equivalently, the multiplication by $\begin{pmatrix} 1 & 0 \\  0 & A \end{pmatrix}$ induces a structure of $\mathbb{Z}[C_A]$-module on $K_A$. This structure is almost invariant under isomorphism in the following sense: if $\phi:G_A \rightarrow G_B$ is a group isomorphism, and if we identify $C_A$ with $C_B$ via $a \mapsto b = (1, (0, \dots, 0)) \in G_B$ then $K_A$ is isomorphic to $K_B$ or to $K_{B^{-1}}$ as a $\mathbb{Z}[C]$-module with $C = C_A \simeq C_B$, depending on whether $\phi(a) = bk$ or $b^{-1}k$ for some $k \in K_B$. This is so because conjugation by $bz$ induces a group action on $K_B$ which is independent of $k$. Now the claimed result immediately follows.

Thus the pair of modules $\{K_A, K_{A^{-1}}\}$ is a group isomorphism invariant of $G_A$  It turns out to be useful for this example and this one.

Addendum. Here are some details on the module $K_A$.
An element of $\mathbb{Z}[C_A]$ is a Laurent polynomial with coefficients in $\mathbb{Z}$ of the form $P(a) = \sum_{i = 0}^d c_i a^{e_i}$ where $e_i \in \mathbb{Z}$ for every $i$. The structure of $\mathbb{Z}[C_A]$-module of $K_A$ is defined in the following way:
$$P(a) \cdot k = (a^{e_0}k^{c_0}a^{-e_0}) \cdots (a^{e_d}k^{c_d}a^{-e_d})$$ for $k \in K_A$. Assume now that there is an isomorphism $\phi: G_A \rightarrow G_B$. As $\phi$ is surjective and $\phi(K_A) = K_B$, there is $f \in \mathbb{Z}$ coprime with $\omega$ and $z \in \mathbb{Z}^n \triangleleft G_B$, such that $\phi(a) = b^f z$. Since $\omega \in \{1, 2, 3, 4, 6\}$, we infer that $\phi(a) = b^{\epsilon}k'$ for some $\epsilon \in \{\pm 1\}$ and some $k' \in K_B$. Thus $\phi(a^e) = b^{\epsilon e}k''$ where $k'' \in K_B $ depends on $e$, $k$ and $\epsilon$. The image of $P(a) \cdot k$ by $\phi$, after substituting $\phi(a^{e_i})$ with $b^{\epsilon e_i}k_i''$, and after simplification ($K_B$ is Abelian), results in $$(b^{\epsilon e_0}\phi(k)^{c_0}b^{- \epsilon e_0}) \cdots (b^{\epsilon e_d}\phi(k)^{c_d}b^{- \epsilon e_d}) = P(b^{\epsilon}) \cdot \phi(k).$$
Therefore $\phi$ induces an isomorphism of $\mathbb{Z}[C]$-module if $\epsilon = 1$, where $C = C_A \simeq C_B$. Let $e_0 \Doteq (\omega, (0, \dots, 0))$. Let $(e_1, \dots, e_n)$ denote the canonical basis of $\mathbb{Z}^n$ and let $C \in \text{GL}_{n + 1}(\mathbb{Z})$ be the matrix of $\phi$ with respect to $(e_0, e_1, \dots, e_n)$. If $\epsilon = 1$, then the following identity $\phi(a \cdot k) = b \cdot \phi(k)$ holds true and translates into
$$C \begin{pmatrix} 1 & 0 \\  0 & A \end{pmatrix} 
 k = \begin{pmatrix} 1 & 0 \\  0 & B \end{pmatrix}C k$$ simply because of the way we defined the action of $a$ and $b$ on $K_A$ and $K_B$ respectively. The claimed result on the matrix conjugation follows.
A: $\newcommand{\IZ}{\mathbb{Z}}$
One can easily verify that $G_A' = \{0\}\times \operatorname{im}(A-1_{m\times m})$. Moreover $G_A$ acts on $G_A'$ by conjugation. The elements of $\IZ^m$ act trivially and the extra $\IZ$ acts by multiplication with $A$. The normal subgroup $K_A:=\operatorname{ord}(A)\IZ \times \IZ^m$ is the kernel of this action, i.e. the subgroup of all elements that act trivially on $G_A'$.
Therefore any isomorphism $G_A \to G_B$ must map $K_A$ to $K_B$. In particular $ord(A)=|G_A/K_A| = |G_B/K_B|=\operatorname{ord}(B)$, let's call that $n$, and $G_A/K_A \cong G_B/K_B \cong \IZ/n\IZ$.
Now consider the conjugation action of $G_A$ on $K_A$ instead of $G_A'$. Since $K_A$ is abelian, this is really an action of $G_A/K_A\cong \IZ/n\IZ$ on $K_A\cong \IZ \times\IZ^m$ given by multiplication with the block matrix $A':=\begin{pmatrix}1&\\&A\end{pmatrix}$.
By considering the induced action on $K_A \otimes \mathbb{Q}$, we find that the two $\mathbb{Q}[\IZ/n]$-modules $K_A \otimes \mathbb{Q}$ and $K_B\otimes \mathbb{Q}$ must be isomorphic. That means that $A'$ and $B'$ are $\mathrm{GL}_{1+m}(\mathbb{Q})$-conjugated at the very least. I'm not sure how one would go from there.
