Find the inverse of a matrix that is very similar to the Hilbert matrix 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.
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.
 A: 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$.
A: These matrices have been considered here.
A: As observed in comments, the problem is equivalent to finding the inverse of the matrices $$H_\lambda:=\Big[{1\over i+j+\lambda}\Big]_{1\le i\le m\atop 1\le j\le m},$$ 
for $\lambda=-1/2$ and $\lambda=-3/2$ and order $m=\lceil n/2\rceil$, respectively $m=\lfloor n/2\rfloor$. These are also particular cases of Cauchy matrices, whose inverses admit the explicit  Schetcher's formula  quoted in the linked question (see the wiki article on Cauchy matrices and the various answers in the linked question). As a matter of  fact, in this particular case the inversion formula takes quite a simpler form, and it turns out that the entries of $H_\lambda^{-1}$ are products of linear factors $\lambda+k$, with $2\le k\le 2m$ and multiplicity not larger than $2$. Precisely
$$H^{-1}_\lambda={1\over(m-1)!^2}\bigg[(-1)^{i+j}{m-1\choose i-1}{m-1\choose j-1}(\lambda+i+1)^{\overline m}(\lambda+j+1)^{\overline m}(\lambda+i+j)^{-1}\bigg]_{1\le i\le m\atop 1\le j\le m}$$ 
where $x^{\overline m}:=x(x+1)\dots(x+m-1)$ denotes a rising factorial.
