This problem is some variation of [another MO question](https://mathoverflow.net/questions/264150/determinant-of-a-matrix-having-diagonal-and-subdiagonal-entries-zero/264167#264167). Consider the matrix
$$M\_n:=\begin{bmatrix}-c& a & a& \dots & a \\ b & c & a& \ddots & a\\ b & b & -c & \ddots & a \\ \vdots & \ddots & \ddots & \ddots & a \\ b & b & b & \dots & (-1)^nc \end{bmatrix}\_{n\times n},$$
that is, a matrix with diagonal $(-1)^ic$, below diagonal entries $b$ and above diagonal entries $a$.



> 
> **Question 1.** Is there a nice closed formula for the determinant $\det(M\_n)$? This has been solved.
> 
> 
> **Question 2.** Is there a nice expression for the inverse $M\_n^{-1}$? This one awaits an answer.
> 
> 
> 



yet another determinant and inverse of a matrix
Based on the answer by მამუკა ჯიბლაძე, I can see a generalized claim for which we need a proof.


Define the polynomial $P\_n(x)=\prod\_{k=1}^n(c\_k-x)$ and consider the matrices
$$A\_n:=\begin{bmatrix}c\_1& a & a& \dots & a \\ b & c\_2 & a& \ddots & a\\ b & b & c\_3& \ddots & a \\ \vdots & \ddots & \ddots & \ddots & a \\ b & b & b & \dots & c\_n \end{bmatrix}\_{n\times n}.$$
Then, we have the determinantal evaluation
$$\det(A\_n)=\frac{a\cdot P\_n(b)-b\cdot P\_n(a)}{a-b}.\tag1$$
**UPDATE.** Here is a proof that I find.
First, consider the matrices 
$$B\_{n-1}:=\begin{bmatrix}a& a & a& \dots & a \\ c\_2 & a & a& \ddots & a\\ b & c\_3 & a& \ddots & a \\ \vdots & \ddots & \ddots & \ddots & a \\ b & b & b & \dots & a \end{bmatrix}\_{n-1}, \qquad
C\_{n-1}:=\begin{bmatrix}b& c\_2 & a& \dots & a \\ b & b & c\_3& \ddots & a\\ b & b & b& \ddots & a \\ \vdots & \ddots & \ddots & \ddots & c\_{n-1} \\ b & b & b & \dots & b \end{bmatrix}\_{n-1}.$$
By subtracting the 2nd row (resp. column) from the 1st, and repeating this in $B\_{n-1}$ (resp. $C\_{n-1}$), it's easy to find that
$$\det(B\_{n-1})=a\prod\_{k=2}^{n-1}(a-c\_k) \qquad \text{and} \qquad
\det(C\_{n-1})=b\prod\_{k=2}^{n-1}(b-c\_k).$$
Next, consider the matrices
$$E\_{n-1}:=\begin{bmatrix}c\_2& a & a& \dots & a \\ b & c\_3 & a& \ddots & a\\ b & b & c\_4& \ddots & a \\ \vdots & \ddots & \ddots & \ddots & a \\ b & b & b & \dots & c\_n \end{bmatrix}\_n, \qquad
F\_{n-2}:=\begin{bmatrix}c\_2& a & a& \dots & a \\ b & c\_3 & a& \ddots & a\\ b & b & c\_4& \ddots & a \\ \vdots & \ddots & \ddots & \ddots & a \\ b & b & b & \dots & c\_{n-1} \end{bmatrix}\_{n-2}.$$
The determinants of $E\_{n-1}$ and $F\_{n-2}$ can be borrowed from the formula of that of $A\_n$.


Finally, apply [Dodgson's method of condensation](https://arxiv.org/pdf/1010.3881.pdf) and routinely (and inductively) verify that the formula in (1) yields the identity
$$\det(F\_{n-2})\cdot\det(A\_n)=\det(A\_{n-1})\cdot\det(E\_{n-1})-\det(B\_{n-1})\cdot\det(C\_{n-1}).$$


