I would like to present a very simple solution by interpretation of these matrices as operators on $\mathbb{R^n}$ (which will surprise nobody...). Triangular matrix $A$ acts as a discrete integration operator:
For any $x_1,x_2,x_3,\cdots x_n$:
$$\tag{1}A (x_1,x_2,x_3,\cdots x_n)^T=(s_1,s_2,s_3,\cdots s_n)^T \ \ \text{with} \ \ \begin{cases}s_1&=&x_1&&&&\\s_2&=&x_1+x_2&&\\s_3&=&x_1+x_2+x_3\\...\end{cases}$$
(1) is equivalent to:
$$\tag{2}A^{-1} (s_1,s_2,s_3,\cdots x_n)^T=(x_1,x_2,x_3,\cdots x_n)^T \ \ \text{with} \ \ \begin{cases}x_1&=& \ \ s_1&&&&\\x_2&=&-s_1&+&s_2&&\\x_3&=&&&-s_2&+&s_3\\...\end{cases}$$
and it suffices now to "collect the coefficients" in the right order in order to constitute the inverse matrix.
(Thus the inverse operation is - in a natural way - a discrete derivation operator).
Hint: Eigenvalues are $\pm \sqrt{-2+2\cos(\theta_j)}, \quad \theta_j=j\pi/(N+1), \quad j=1,\ldots,N$.
Best Answer
HINT: Let $B$ be the $n\times n$ matrix of ones. Then $XB=B$, so
$$X(B-I)=XB-X=B-X=(n-1)I\;,$$
where $I$ is the $n\times n$ identity matrix.
By the way, manually calculating the inverses for $n=2$ and $n=3$ was enough to suggest what the answer ought to be, and discovering the argument suggested above was then quite easy.