TITLE: If the map induces identity on all homotopic groups then it is homotopic to identity
QUESTION [6 upvotes]: Recall that, in general, maps of CW complexes $X\to Y$ which induce the same maps of all homotopy groups $\pi_*(X,x)\to \pi_*(Y,y)$, need not be homotopic. 
Assume however, that we have a continuous self-map $f: (X,x) \rightarrow (X,x)$ of a connected CW complex $X$ which induces identity morphisms on all homotopy groups. Is it true that $f$ is actually homotopic to the identity map on $X$?
Note that in this setting Whitehead's theorem says $f$ is a homotopy equivalence.

REPLY [4 votes]: Shih proved that, if $X$ is simply connected with two nontrivial homotopy groups, then the group of self-homotopy equivalences of $X$ inducing the identity on the homotopy groups is naturally identified the cohomology group $H^m(K(\pi_n(X),n),\pi_m(X))$, and so is frequently nontrivial.