homologies of some subsets of ${R}^{n}$ This might be something well-known.
For $1\le k\le n$, let $A(n,k)\subset\mathbb{R}^{n}$ be the set  of points $x=(x_{1},...,x_{n}%
)$ with at least $k$ distinct coordinates. Then what are the homologies of
$A(n,k)$? 
For example, $A(n,2)$ is equal to $\mathbb{R}^{n}\backslash\Delta$,
where $\Delta$ is the diagonal, thus it is homotopy equivalent to
$\mathbb{S}^{n-2}$.
 A: Let me try again after deleting an answer based on a misunderstanding of the question. (Thanks to @YCor for pointing this out.)
Edited thanks to observations of Dan Petersen.
Your space $A(n,k)$ is obtained from ${\mathbb R}^n$ by deleting a bunch of subspaces.  Thus the theorem of Goresky and McPherson dealing with complements of unions of subspaces applies.  This says that
$$\widetilde{H}^d(A(n,k)) \cong \bigoplus_X \widetilde{H}_{codim(X)-2-d}(\Delta(0,X)).$$
Here $X$ runs through the set of intersections of collections deleted subspaces, which is partially ordered by reverse inclusion, $\Delta(0,X)$ is the order complex of the interval $(0,X)$ ($0$ is the ambient space ${\mathbb R}^n$, which is not included in the sum), and $codim(X)$ is the usual codimension of the subspace $X$ in ${\mathbb R}^n$.
The intersection poset for this union of subspaces is isomorphic with the poset of set partitions of $\{1,\ldots,n\}$ having less than $k$ parts, ordered by reverse inclusion.  As this is a rank selected subposet of the lattice of all set partitions, it is a Cohen-Macaulay poset. This means that the homology of $\Delta(0,X)$ is concentrated in degree $rank(X)-2$.  On the other hand, if $X$ has $j$ parts, then $X$ has rank $k-j$ (in the intersection post) and codimension $n-j$.
It follows now from direct computation that the reduced homology of your space is concentrated in degree $n-k$.  As Dan Petersen pointed out to me, if $k \leq n-2$, then $A(n,k)$ is simply connected, and it follows from the Hurewicz Theorem that $A(n,k)$ is homotopy equivalent to a wedge of spheres of dimension $n-k$.
Calculating the number of such spheres involves determining the M\"obius function on the intersection poset, which might or might not be tough.
