= Solution
Suppose $G$ is generated by $d$ elements. An <index of a subgroup> $n$ gives a transitive action of $G$ on $n$ cosets. After labelling them by $1,\ldots,n$, this is a homomorphism $G\to S_n$, and the subgroup is the stabilizer of one label. There are at most $(n!)^d$ homomorphisms, since images of the generators determine the map, and at most $n$ point stabilizers for each map. Thus \b[there are finitely many subgroups of each specified finite index], with the coarse bound $n(n!)^d$.
The <finite residual> is
$$
R_G=\bigcap_{N\triangleleft G,\ [G:N]<\infty}N.
$$
It is equivalently the intersection of the kernels of all homomorphisms to finite groups. Intersecting all finite-index subgroups gives the same subgroup, since each contains its <normal core>, a normal subgroup of finite index. A <residually finite group> is one with $R_G=1$, equivalently every nonidentity element survives in a finite image.
A <Hopfian group> is one whose surjective endomorphisms are all injective, hence automorphisms. Let $\theta:G\to G$ be surjective, retaining the finite-generation hypothesis. For each $n$, pulling back by $\theta$ sends a normal subgroup of index $n$ to another normal subgroup of the same index. It is injective on this finite set: equality of two preimages implies equality of the subgroups because $\theta$ is surjective. Therefore it is a permutation. For every finite-index normal subgroup $N$, some $m\ge1$ satisfies
$$
\theta^{-m}(N)=N.
$$
It follows that $\ker\theta\subseteq\ker\theta^m\subseteq N$. Intersecting over $N$ proves <finite residual contains surjective endomorphism kernels>:
$$
\boxed{\ker\theta\subseteq R_G.}
$$
If $G$ is also a <residually finite group>, this forces every surjective endomorphism to have trivial kernel, proving that a finitely generated residually finite group is <Hopfian>.
For the specified <Baumslag-Solitar group>, use the convention $[x,y]=xyx^{-1}y^{-1}$ and write
$$
a_i=t^iat^{-i}\qquad(i\in\mathbb Z).
$$
In the <abelianization>, the defining relation gives $2a=3a$, so the image of $a$ is zero, while $t$ generates an unrestricted infinite cyclic group. Thus $G/G'\cong\mathbb Z$ through the exponent sum of $t$. The kernel is generated by all $a_i$: any word can be rewritten as a product of conjugates of $a$ followed by the final power of $t$. Alternatively $a=[t,a^2]\in G'$, so all $a_i\in G'$, while killing them leaves a cyclic quotient. Therefore
$$
\boxed{G'=\langle t^iat^{-i}:i\in\mathbb Z\rangle.}
$$
Define $\theta(a)=a^2$ and $\theta(t)=t$. This respects the defining relation because
$$
t(a^2)^2t^{-1}=(ta^2t^{-1})^2=a^6=(a^2)^3.
$$
The image contains $a^2$, $t$, and $ta^2t^{-1}=a^3$, hence contains $a=a^3(a^2)^{-1}$ and is all of $G$. It is not injective. Indeed
$$
c=[tat^{-1},a]=tat^{-1}ata^{-1}t^{-1}a^{-1}
$$
maps to $[a^3,a^2]=1$. But it is a reduced word in the <HNN extension> with associated subgroups $\langle a^2\rangle$ and $\langle a^3\rangle$. Its potential subwords $ta^{\pm1}t^{-1}$ do not have even exponent, and its potential subword $t^{-1}at$ does not have exponent divisible by three. It has no <pinch in an HNN extension>, so <Britton's lemma> gives $c\ne1$. We have explicitly exhibited \b[a surjective, noninjective endomorphism].
It remains to treat the whole second <commutator subgroup>, not just this one kernel element. Set
$$
K=\bigcup_{k\ge1}\ker\theta^k.
$$
These kernels form an increasing sequence of normal subgroups, so $K$ is a normal subgroup. Every iterate is surjective, and the preceding <finite residual> argument gives $K\subseteq R_G$.
Conjugating the defining relation gives $a_{i+1}^2=a_i^3$ for every integer $i$. Repeated substitution gives, for $j>i$,
$$
a_j^{2^{j-i}}=a_i^{3^{j-i}}.
$$
Also $\theta^k(a_i)=a_i^{2^k}$. Thus when $k\ge j-i$,
$$
\theta^k([a_i,a_j])=[a_i^{2^k},a_j^{2^k}]=[a_i^{2^k},a_i^{3^{j-i}2^{k-(j-i)}}]=1.
$$
Every pair of the generating elements of $G'$ therefore commutes modulo $K$. The image of $G'$ in $G/K$ is abelian, which means $G''\subseteq K$. This proves the full statement using <iterated endomorphism kernels in BS(2,3)>:
$$
\boxed{G''\subseteq\bigcup_{k\ge1}\ker\theta^k\subseteq R_G.}
$$
Back to article page