residually finite-by-$\mathbb{Z}$ groups are residually finite I believe I read somewhere that residually finite-by-$\mathbb{Z}$ groups are residually finite. That is, if $N$ is residually finite with $G/N\cong \mathbb{Z}$ then $G$ is residually finite.
However, I cannot remember where I read this, and nor can I find another place which says it. I was therefore wondering if someone could confirm whether this is true or not, and if it is give either a proof or a reference for this result? (If not, a counter-example would not go amiss!)
Note that I definitely know it is true if $N$ is f.g. free (this can be found in a paper of G. Baumslag, "Finitely generated cyclic extensions of free groups are residually finite" (Bull. Amer. Math. Soc., 5, 87-94, 1971)).
 A: This is not true if $N$ is not assumed f.g. E.g. the wreath product of a nonabelian finite group $H$ by the integers is not residually finite (Gruenberg 1957, can be checked as a exercise). Here $N$ is an infinite direct sum of copies of $H$ (shifted by the action of the integers) and is residually finite.
A: This is not true. The most prominent examples of non-residually finite central extensions of residually finite groups (by $\mathbb Z$) are certain lattices in non-linear Lie groups.
See for example
M. S. Raghunathan. Torsion in cocompact lattices in coverings of Spin(2, n). Math. Annalen 266, 403–419, 1984.
or
P. Deligne. Extensions centrales non residuellement finies de groupes arithmetiques. CR Acad. Sci. Paris, serie A-B, 287, 203–208, 1978.
A: The modified question has a positive answer if $N$ is finitely generated.
Consider an extension $1 \to N \to G \to \mathbb Z \to 1$ and take a lift $u \in G$ of the generator of $\mathbb Z$. If $N$ is finitely generated and $H' \subset N$ is a subgroup of finite index, then the intersection of all subgroups of index $[N:H']$ (call it $H$) is invariant under conjugation by $u$. Hence, for all $m \in \mathbb Z$, the subgroup $Hu^{m \mathbb Z}$ is a finite index normal subgroup of $G$.
Hence, if $N$ is finitely generated and residually finite, then $G$ is residually finite as well.
A: I think what Yves meant in his comment to Andreas' answer is the result of Mal'cev [A. I. Mal'cev, On homomorphisms onto finite groups, Ivanov. Gos. Ped. Inst. Ucen. Zap., 18 (1958), pp. 49-60, in Russian] stating that any split extension of a finitely generated residually finite group by a residually finite group is residually finite. This is indeed an easy exercise. In particular, this implies that every (f.g. residually finite) - by - Z group is residually finite as every extension by a free group (e.g., by Z) splits. 
If either of the conditions "finitely generated" or "split" is relaxed, the result does not hold. The counterexample with infinitely generated kernel is already provided by Yves. For non-split extensions there are even examples of the form $$1\to \mathbb Z/2\mathbb Z \to G\to Q\to 1,$$ where $Q$ is (finitely generated) residually finite while $G$ is not. In particular, being residually finite is not a quasi-isometry invariant.
Such examples can be found among solvable (moreover, center-by-metabelian) groups or even among groups of intermediate growth (see [A. Erschler, Not residually finite groups of intermediate growth, commensurability and non-geometricity, Journal of Algebra, 272 (2004), 154-172].
