This is an extension of a question I asked [here on Math.SE](https://math.stackexchange.com/q/3251019/274352)




---


Assume that I have a finitely generated residually finite centerless group $G$. Is it true that the profinite completion $\hat{G}$ also has trivial center? 


In the linked question, user YCor was able to show that this **fails** in general if you do not assume either finite generation or residually finite. However, the result happens to be true if $G$ is a surface group. I’d like to know if this is a phenomenon specific to surface groups, or if this is a more general fact.



Does a (nice) centerless group always have a centerless profinite completion?
The answer is No in general. Let $n\geq 3$ be odd (it is not necessary that $n$ be odd) and suppose $G=\mathrm{SL}\_n({\mathbb Z})$. There exists a subgroup $\Gamma \subset \mathrm{SL}\_n({\mathbb Z})$ of finite index which is torsion-free and centreless (the centre can only be $\pm 1$ and because $n$ is odd the centre can only be trivial). However, $\mathrm{SL}\_n({\mathbb Z})$ has the congruence subgroup property which means that we have the following inclusion of the profinite completions: 


$$\widehat {\mathrm{SL}\_n({\mathbb Z})}= \prod \_{q \; \mathrm{prime}} \mathrm{SL}\_n({\mathbb Z}\_q)\supset \widehat {\Gamma} \supset \prod \_{p\in S} U\_p \times \prod \_{ \ell \notin S} \mathrm{SL}\_n({\mathbb Z}\_\ell),$$
where $S$ is a finite set of primes, $U\_p$ is an open subgroup of finite index in $\mathrm{SL}\_n({\mathbb Z}\_p)$, and $\ell$ runs through primes in the complement of $S$. Since for infinitely many $\ell$ (for example, all $\ell$ with $\ell\equiv 1 \; (\mathrm{mod}\;n)$), the group $\mathrm{SL}\_n({\mathbb Z}\_\ell)$ has $n$-th roots of unity in the centre, it follows that the profinite completion of $\Gamma $ is not centreless. 


