[step:Compute $H^i(\mathbb{R}^d, \mathbb{R}^d \setminus K_n; R)$ via the long exact sequence]
Consider the long exact sequence of the pair $(\mathbb{R}^d, \mathbb{R}^d \setminus K_n)$:
\begin{align*}
\cdots \to H^{i-1}(\mathbb{R}^d; R) \to H^{i-1}(\mathbb{R}^d \setminus K_n; R) \xrightarrow{\partial} H^i(\mathbb{R}^d, \mathbb{R}^d \setminus K_n; R) \to H^i(\mathbb{R}^d; R) \to \cdots
\end{align*}
Since $\mathbb{R}^d$ is contractible, $H^i(\mathbb{R}^d; R) = 0$ for all $i \geq 1$ and $H^0(\mathbb{R}^d; R) \cong R$. Therefore for $i \geq 2$, the long exact sequence gives isomorphisms
\begin{align*}
\partial: H^{i-1}(\mathbb{R}^d \setminus K_n; R) \xrightarrow{\;\sim\;} H^i(\mathbb{R}^d, \mathbb{R}^d \setminus K_n; R).
\end{align*}
Now $\mathbb{R}^d \setminus K_n$ is homotopy equivalent to $S^{d-1}$: the radial projection $x \mapsto n \cdot x/|x|$ provides a deformation retraction of $\mathbb{R}^d \setminus K_n$ onto the sphere $\partial K_n = S^{d-1}(0, n) \cong S^{d-1}$. By the [Homology of Spheres](/theorems/1945), $H^j(S^{d-1}; R) \cong R$ for $j = 0$ and $j = d-1$, and is zero otherwise. Therefore:
\begin{align*}
H^i(\mathbb{R}^d, \mathbb{R}^d \setminus K_n; R) \cong H^{i-1}(\mathbb{R}^d \setminus K_n; R) \cong H^{i-1}(S^{d-1}; R) \cong \begin{cases} R & i = d, \\ 0 & i \geq 2, \; i \neq d. \end{cases}
\end{align*}
For $i = 1$: the relevant portion of the long exact sequence is
\begin{align*}
H^0(\mathbb{R}^d; R) \xrightarrow{j^*} H^0(\mathbb{R}^d \setminus K_n; R) \xrightarrow{\partial} H^1(\mathbb{R}^d, \mathbb{R}^d \setminus K_n; R) \to H^1(\mathbb{R}^d; R) = 0.
\end{align*}
Since $\mathbb{R}^d \setminus K_n$ is path-connected (for $d \geq 2$), $H^0(\mathbb{R}^d \setminus K_n; R) \cong R$, and the restriction $j^*: R \cong H^0(\mathbb{R}^d; R) \to H^0(\mathbb{R}^d \setminus K_n; R) \cong R$ sends the constant function $1$ to the constant function $1$, so $j^*$ is an isomorphism. Exactness gives $H^1(\mathbb{R}^d, \mathbb{R}^d \setminus K_n; R) = 0$ for $d \geq 2$.
For $d = 1$: $\mathbb{R} \setminus [-n, n]$ consists of two path components $(-\infty, -n)$ and $(n, \infty)$, so $H^0(\mathbb{R} \setminus K_n; R) \cong R^2$. The map $j^*: R \to R^2$ sends $1$ to $(1, 1)$, so $\operatorname{coker}(j^*) \cong R$ and $H^1(\mathbb{R}, \mathbb{R} \setminus K_n; R) \cong R$.
For $i = 0$: the sequence begins $0 \to H^0(\mathbb{R}^d, \mathbb{R}^d \setminus K_n; R) \to H^0(\mathbb{R}^d; R) \to H^0(\mathbb{R}^d \setminus K_n; R)$. The map $H^0(\mathbb{R}^d; R) \to H^0(\mathbb{R}^d \setminus K_n; R)$ is injective (it is restriction of locally constant functions from a connected space to a nonempty subspace), so $H^0(\mathbb{R}^d, \mathbb{R}^d \setminus K_n; R) = 0$.
Combining all cases: $H^i(\mathbb{R}^d, \mathbb{R}^d \setminus K_n; R) \cong R$ if $i = d$, and $0$ otherwise.
[/step]