The standard Hilbert matrix $H$ is given by
$$H\_{ij}=\frac{1}{i+j-1},$$
and it has an inverse given for example [in this MO question](https://mathoverflow.net/questions/47561/deriving-inverse-of-hilbert-matrix).


Now I have encountered a matrix $M$ of similar form, namely, 


$$M\_{ij}=\frac{1+(-1)^{i+j}}{i+j-1}.$$


Does anyone know the explicit formula for the inverse of M? Please provide some relevant reference if available.


A more general form for this question can be found [here](https://mathoverflow.net/questions/263216/find-the-inverse-of-a-more-general-matrix-that-is-similar-to-the-hilbert-matrix).



Find the inverse of a matrix that is very similar to the Hilbert matrix
We present a generalization and also give an explicit solution.


If $M$ is the $n\times n$ matrix
$$M=\left[\frac{1+(-1)^{i+j}}{x\_i-y\_j}\right]\_{i,j=1}^n$$
then the inverse matrix $K:=M^{-1}$ has entries given by
\begin{align}
K\_{a,b}=\begin{cases}
2\frac{\prod\_{2j-1\neq b}x\_{2j-1}-y\_a}{\prod\_{2j-1\neq a}y\_a-y\_{2j-1}}\cdot \frac{\prod\_{2k-1}x\_b-y\_{2k-1}}{\prod\_{2k-1\neq b}x\_{2k-1}-x\_b} \qquad \text{$a, b$ are odd} \\
\,\,\,\,\,\,\,\, 2\frac{\prod\_{2j\neq b}x\_{2j}-y\_a}{\prod\_{2j\neq a}y\_a-y\_{2j}}\cdot \frac{\prod\_{2k}x\_b-y\_{2k}}{\prod\_{2k\neq b}x\_{2k}-x\_b} \qquad \,\,\,\,\,\,\,\, \text{$a, b$ are even} \\
\qquad \qquad \qquad \,\,\, 0 \qquad \qquad \qquad \qquad \text{otherwise}.
\end{cases}
\end{align}
**Convention.** For instance, when $a$ is odd, the product $\prod\_{2j-1\neq b}(x\_{2j-1}-y\_a)$ is understood as running through all odd integers from $1$ to $n$, excluding $b$.


The solution to your problem is found by replacing $x\_i=i-1$ and $y\_j=-j$. Hence, in this case,
\begin{align}
K\_{i,j}=\begin{cases}\frac{2(-1)^{a+b}n\_1^2}{16^{n\_1-1}(2a+2b-3)}
\binom{2n\_1+2a-2}{2a-2}\binom{2n\_1+2b-2}{2b-2}\binom{2n\_1-1}{n\_1-a}\binom{2n\_1-1}{n\_1-b} \qquad i=2a-1,\, j=2b-1 \\
\qquad \frac{(-1)^{a+b}8ab}{16^n(2a+2b-1)}\binom{2n\_2+2a}{2a}\binom{2n\_2+2b}{2b}\binom{2n\_2}{n\_2-a}\binom{2n\_2}{n\_2-b} \qquad \qquad i=2a, \, j=2b \\
\qquad \qquad \qquad \qquad \qquad 0 \qquad \qquad \qquad \qquad \qquad \qquad \text{otherwise}
\end{cases} \end{align}
where we use designating $n\_1=\lfloor\frac{n+1}2\rfloor$ and $n\_2=\lfloor\frac{n}2\rfloor$.


