Singular homology of spin manifolds Given a closed, connected, spin, differentiable $n$-manifold $M$, $n\geq 3$, are there any restrictions on the integral singular homology groups of it? In other words, can one realize any finitely generated abelian group as a $k$-th singular homology group over $\mathbb Z$ of some closed, connected, spin, differentiable $n$-manifold $M$, where $1\leq k\leq n$, $n\geq 3$? If this question can be answered only for one fixed $k$ and not for all $k$'s simultaneously, it will be also very helpful. In particular, I wonder whether arbitrary torsion can be realized.
 A: There is only one constraint beyond those coming from Poincare duality, the one mentioned in Aleksandar's comment. So in total, we have:

*

*The top homology is $H_n(M;\Bbb Z) = \Bbb Z$.

*The second-to-top homology $H_{n-1}(M;\Bbb Z) \cong H^1(M;\Bbb Z) \cong \text{Hom}(H_1 M, \Bbb Z)$ is a free abelian group.

*If $n \not\equiv 0 \mod 8$, then $b_{n/2}$ is even.

The only condition which doesn't come from Poincare duality is the condition that when $n \equiv 4 \mod 8$ we have $b_{n/2}$ even, which Aleksandar proves in his comment above.
Other than those precluded by these conditions, we may have $H_k(M;\Bbb Z) \cong G$ for any finitely generated abelian group $G$.
To establish this, you just need to construct suitable manifolds. Let $n \ge 3$ be given. For $0 < k < n-1$, We will construct manifolds with $H_k = \Bbb Z/r$; for $0 < k < n$ with $k \ne n/2$ we will consturct manifolds with $H_k = \Bbb Z$; and for $k = n/2$ we will either construct manifolds with $H_{n/2} = \Bbb Z^2$ or $= \Bbb Z$, depending on the value of $n$ mod $8$. Because homology (outside of top and bottom degrees) is additive under connected sum, taking sums of these examples establishes that $H_k(M;\Bbb Z) \cong G$ is achievable for any finitely generated abelian group $G$ satisfying the conditions above.
The constructions below are similar to those mentioned by Nick L in the comments.

First, the non-torsion part.

*

*There is a compact connected spin manifold $X$ with $H_k(X;\Bbb Z) = \Bbb Z$ whenever $k \ne n/2$: Take $X = S^k \times S^{n-k}$. For $k = n/2$ and $n = 8\ell$, you can take $\Bbb{HP}^{2\ell}$.

*For $k = n/2$ but $n \not\equiv 0 \mod 8$, the best we can do is $H_{n/2}(X;\Bbb Z) = \Bbb Z^2$; take $X = S^k \times S^k$.

Now to handle torsion, we show there exists a manifold $X'_r$ with $H_k(X'_r;\Bbb Z) = \Bbb Z/r$ for all $0 < k < n$.

*

*For $1 < k < n/2$, take $X = S^k \times S^{n-k}$. Perform surgery on an embedded sphere $S$ which generates the homology class $r[S^k \times \{*\}]$ --- which exists so long as $k < n/2$ by the standard transversality argument --- and Mayer-Vietoris implies that the resulting manifold $X'_r$ has $H_k(X'_r;\Bbb Z) \cong \Bbb Z/r$. By $k \ge 2$ we have $H^1(X'_r;\Bbb Z) = H^2(X'_r;\Bbb Z) = 0$, so these are spin.

*The cases $n/2 \le k < n-2$ now follow from Poincare duality and the universal coefficient theorem by taking the same manifolds $X'_r$.

*For $k = 1$ and $k = n-2$, take $L(r,1) \times S^{n-3}$, which has $H_1 = H_{n-2} = \Bbb Z/r$ by the Kunneth theorem.

