TITLE: Are there two non-homotopy equivalent spaces with equal homotopy groups?
QUESTION [28 upvotes]: Could someone show an example of two spaces $X$ and $Y$ which are not of the same homotopy type, but nevertheless $\pi_q(X)=\pi_q(Y)$ for every $q$? Is there an example in the CW complex or smooth category?

REPLY [2 votes]: Consider $X=S^1\vee S^3$ and its double cover $X_2$ i.e, attach two copy of $S^3$ one in north pole and one in south pole of $S^1$. Then $\pi_1(X) =\mathbb{Z} = \pi_1(X_2)$. And covering map induced isomorphism in $\pi_n$ for all $n\geq 2$. But they are not homotopically equivalent since their Eular Characteristics are different.

REPLY [2 votes]: The  simplest examples I know  are the $3$-dimensional lens spaces $L(p,q)$. They display many oddities.
Consider the  lens spaces  $L(p,q_0)$ and $L(p,q_1)$, $\gcd(p,q_0)=\gcd(p,q_1)=1$. Their fundamental groups are isomorphic to the   cyclic group $\newcommand{\bZ}{\mathbb{Z}}$ $\bZ/p\bZ$. Since  both these lens spaces have the same universal cover $S^3$,  their  higher homotopy groups are also isomorphic.
A theorem of Franz-Rueff-Whitehead (see Theorem 2.60 of these notes)  shows that $L(p,q_0)$ and $L(p,q_1)$ are homotopy equivalent if and only 
$$q_1\equiv \pm \ell^2 q_0\bmod p,  $$
for some $\ell\in\bZ$.   This reduces  the problem to  a number theoretic one. For example,  $L(5,1)$ is not homotopy equivalent to $L(5,2)$ since $\pm 2$ is not a quadratic residue mod $5$.
On the other hand, the lens spaces $L(7,1)$ and $L(7,2)$ are homotopy equivalent, but they are not homeomorphic.