Existence of topological space which has no "square-root" but whose "cube" has a "square-root" Does there exist a topological space $X$ such that $X \ncong Y\times Y$ for every topological space $Y$ but
$$X\times X \times X \cong Z\times Z$$
for some topological space $Z$ ? 
Here $\cong$ means homeomorphic.
 A: Yes.
Here are two pieces of input data.
1) Let $M$ be any noncompact space. Beyond the usual invariants like homology and homotopy groups, there is a further invariant of the homeomorphism type (or proper homotopy type) of $M$, called the fundamental group at infinity: if you choose a proper (inverse image of compact sets is compact) map $\gamma: [0,\infty) \to M$, and let $K_n$ be an increasing compact exhaustion of $M$ (that is, $K_n \subset K_{n+1}$ and $\bigcup K_n = M$) so that $\gamma(t) \not \in K_n$ for $t \in [n, n+1]$, then one may write the inverse limit $$\pi_1^\infty(M,\gamma) := \lim \pi_1(M - K_n, \gamma(n));$$ strictly speaking we have restriction maps $$\pi_1(M - K_n, \gamma(n)) \to \pi_1(M - K_{n-1}, \gamma(n)),$$ but we may use the path $\gamma$ from $\gamma(n)$ to $\gamma(n-1)$ to get a natural isomorphism $\pi_1(M - K_{n-1}, \gamma(n)) \to \pi_1(M - K_{n-1}, \gamma(n-1))$ so that we may take the inverse limit over a sequence of maps as above. This is essentially independent of the choice of sequence $K_n$. It only depends on the ray $\gamma$ up to a proper homotopy. 
(Similarly, there is a notion of the set of ends of a space - this is the inverse limit over $\pi_0(M - K_n)$. This is the set we choose $\gamma$ from, in the sense that we choose a connected component for the usual fundamental group.) 
2) If $M$ is a smooth, connected, noncompact manifold of dimension $n \geq 5$, a theorem of Stallings (the piecewise linear structure of Euclidean space, here) says that if $M$ is both contractible and $\pi_1^\infty(M,\gamma) = 0$ for the unique end $\gamma$ of $M$, then $M \cong \Bbb R^n$. 
Our strategy, therefore, is to find a noncompact, contractible smooth manifold $M$ of dimension $n \geq 3$ with nontrivial fundamental group at infinity. We will argue that $\pi_1^\infty(M^k, \gamma) = 0$ for $k>1$, and hence that $M^k \cong \Bbb R^{nk}$. Because you asked for a square root of $3n$, we should take $n$ even. At the end we will specify $n = 4$. 
Here is a helpful tool in constructing such noncompact manifolds. If $M$ is a compact manifold with boundary, then its ends of its interior $M^\circ$ are in bijection with $\pi_0(\partial M)$, and the fundamental group at infinity is equal to $\pi_1(\partial M)$. (Take the ray to extend to a map $[0, \infty] \to M$, and let the basepoint in $\partial M$ be $\gamma(\infty)$; if $[0,1) \times \partial M \subset M$ is a collar of the boundary, let the compact exhaustion be the complement of $[0, 1/n) \times \partial M$.) 
In this situation above, the product $M \times M$ is a compact topological manifold with boundary (it has "corners", but these are topologically the same as boundary points). The boundary is homeomorphic to $(\partial M \times M) \cup_{\partial M \times \partial M} (M \times \partial M)$. If $\partial M$ is connected and $M$ is simply connected, the Seifert van Kampen theorem dictates that the fundamental group of the result is $$\pi_1\partial M *_{\pi_1 \partial M \times \pi_1 \partial M} \pi_1 \partial M = 0.$$ 
Therefore, if $M$ is simply connected with connected boundary, $M \times M$ has simply connected boundary; and hence $(M \times M)^\circ = M^\circ \times M^\circ$. 
What this proves, altogether, is that if $M$ is a compact, contractible manifold of dimension $n \geq 3$, and $\pi_1(\partial M) \neq 0$, then $M$ is not homeomorphic to $\Bbb R^n$, but $M^k$ is homeomorphic to $\Bbb R^{nk}$ for any $k > 1$. What remains is twofold: to show that such $M$ exist; and to find one that is itself not a square. 

First, existence. In dimension 3 there are none of these of interest: a compact contractible 3-manifold is homeomorphic to the 3-ball by the solution of the Poincare conjecture. In dimension 4 these are called Mazur manifolds and come in great supply. In dimension $n \geq 5$, if $\Sigma$ be an $(n-1)$-manifold which has $H_*(\Sigma;\Bbb Z) \cong H_*(S^{n-1};\Bbb Z)$, it is a theorem of Kervaire that $\Sigma$ bounds a contractible manifold $M$. If $\pi_1 \Sigma \neq 0$ (which is equivalent to saying "$\Sigma$ is not homeomorphic to the $(n-1)$-sphere", by the higher-dimensional Poincare conjecture), then this gives an example of what we want. (In fact, for $n \geq 6$, Kervaire proved that you can even construct such `homology $(n-1)$-spheres' with any specified finitely presented fundamental group $\pi$, modulo the conditions $H_1(\pi) = H_2(\pi) = 0$.) So we see there is any such compact manifold $M$, and hence noncompact manifold $M^\circ$, for any dimension $n \geq 4$. 

If $M^\circ$ were a product $X \times X$ of two spaces, then first, observe $X$ would need to be contractible; second, it is a homology manifold (this is a local condition in terms of the relative homology of $(X, X - p)$ at all points $p$ which ensures duality properties) of dimension $\dim M/2$. A homology manifold of dimension $\leq 2$ is a manifold (this seems to be well-known, but the only reference I could find was Theorem 16.32 in Bredon's sheaf theory), so let's take $\dim M = 4$ here; then $X$ is a contractible surface, so the classification of compact surfaces implies $X \cong \Bbb R^2$ (see eg here). This contradicts $0 = \pi_1^\infty(\Bbb R^4) \cong \pi_1^\inf(M^\circ) \neq 0$, and so this is impossible. 
In fact, with some more work you can show that this $M$ may not even be decomposed into a product at all. 
EDIT: Thanks to Moishe Cohen's answer here we can prove that if $M$ is a compact contractible manifold of dimension $n \geq 4$ for which $\pi_1 \partial M \neq 0$, then $M$ does not admit a square root. For if it did, $X \times X = M$, the space $X$ would be a contractible homology manifold of dimension at least 2; by Moishe's answer, it must have one end. Using the decomposition $\text{End}(X \times X) \sim \text{End}(X) * \text{End}(X)$ of end-spaces of a product, we see that $\pi_1^\inf(X \times X) = \pi_1^\inf(X) *_{\pi_1^\inf(X) \times \pi_1^\inf(X)} \pi_1^\inf(X) = 0$, exactly as in the case of manifolds with boundary. Thus $M$ admits no square root. 
This method thus produces some $M$ that admits no square root but whose $n$th power admits a $k$th root, for any pair of positive integers $(n,k)$ with $n > 1$. It has no power to find spaces for which $X^j$ is similarly un-rootable for $j$ in some range; it is unique to $j=1$ that this works. 
