Inverse of special upper triangular matrix

Let $A$ be the nilpotent matrix $$\begin{pmatrix}0 & 1 & 1 & \cdots & 1 \\ & 0 & 1 & \cdots & 1 \\ & & \cdots & \cdots & \cdots \\ & & & 0 & 1 \\ & & & & 0\end{pmatrix},$$ then the matrix $P$ is equal to $1 + \beta A + \alpha A^2$.

This gives the inverse: \begin{eqnarray*}P^{-1} & = & (1 + \beta A + \alpha A^2)^{-1} \\ & = & (1 - \lambda A)^{-1} (1 - \mu A)^{-1} \\ & = & \sum_{k \geq 0} \frac{\lambda^{k + 1} - \mu^{k + 1}}{\lambda - \mu} A^k,\end{eqnarray*} where $\lambda$ and $\mu$ are the two roots of the equation $x^2 + \beta x + \alpha = 0$. Since we have $A^n = 0$, the sum essentially ranges through $0 \leq k < n$.


Working out the the details of the answer given by user WhatsUp, the elements of the inverse of $\mathbf{P}$ are given by

\begin{equation} p^{(-1)}_{i,j} =\begin{cases} 0, &i>j,\\ 1, &i=j,\\ \frac{\lambda^2(1+\lambda)^{j-i-1}-\mu^2(1+\mu)^{j-i-1}}{\lambda-\mu},&i<j. \end{cases} \end{equation}