TITLE: Does every two-generated subgroups being nilpotent imply that the group itself is nilpotent?
QUESTION [5 upvotes]: It is trivial that a group $G$ is abelian if and only if every subgroup of $G$ with two generators is abelian (i.e., any two elements commute).
If $G$ is a nilpotent group, every subgroup with two generators must be nilpotent. Is the reciprocal true? More precisely:

Let $G$ be a group and suppose that every subgroup of $G$ generated by
  two elements is nilpotent (with uniformly bounded class if needed). Is
  $G$ necessarily nilpotent?

REPLY [7 votes]: If we do not require that the class of a subgroup generated by two elements is bounded by some fixed constant, here is one example.
Consider the infinite direct sum $G = G_1 \oplus G_2 \oplus G_3 \oplus \cdots$  where $G_i$ is nilpotent of class $i$. 
Then $G$ is not nilpotent, since it has nilpotent subgroups of arbitrarily large class. But any finitely generated subgroup of $G$ is contained in $G_1 \oplus G_2 \oplus \cdots \oplus G_n$ for some $n$, and this subgroup is nilpotent of class $n$. In particular any subgroup generated by two elements is nilpotent.