How is this matrix called (two diagonals)? I need to write an algorithm for solving this matrix but I wanted to first make a search online and that's why I need its name. 
 

You can rearrange terms, to get the following system
$$
\left [ \begin{array}{ccccccc}
d_1 & a_{2n+1} \\
a_1 & d_{2n+1} \\
& & d_2 & a_{2n} \\
& & a_2 & d_{2n} \\
& & & & \ddots \\
& & & & & d_n & a_{n+2} \\
& & & & & a_n & d_{n+2} \\
& & & & & & & d_{n+1}
\end{array}\right ] \left [ \begin{array}{c}
x_1 \\ x_{2n+1} \\ x_2 \\ x_{2n} \\ \vdots \\ x_n \\ x_{n+2} \\ x_{n+1}
\end{array}\right ] = \left [ \begin{array}{c}
b_1 \\ b_{2n+1} \\ b_2 \\ b_{2n} \\ \vdots \\ b_n \\ b_{n+2} \\ b_{n+1}
\end{array}\right ]
$$
which is equivalent to solving $n$ $2\times 2$ linear systems and $1$ algebraic equation of $1^{st}$ order.
