<s>[INST] Determinant of an $n\times n$ matrix with 5's on the diagonal and 2's on the superdiagonal and subdiagonal 
Possible Duplicate:
Special determinant formula for a specific matrix 

How to find $\det A_n$ as a function of $n$? 
$$A_n=\begin{pmatrix} 5&2 &0& 0  & \ldots &  0\\
2& 5& 2& 0 & \ldots &   0\\
0 &2& 5 &2  & \ldots &  0\\
\vdots & \vdots & \vdots & \vdots & \ddots  &   \vdots\\
0 &0& 0& 0 & \ldots &   5\end{pmatrix}$$
I tried to develop Laplace and mathematical induction, but I don't know how to do it.
 [/INST] Example:
$$
\left|\begin{matrix}
5&2&0&0\\
2&5&2&0\\
0&2&5&2\\
0&0&2&5
\end{matrix}\right|
=5\left|\begin{matrix}
5&2&0\\
2&5&2\\
0&2&5
\end{matrix}\right|
-2\left|\begin{matrix}
2&2&0\\
0&5&2\\
0&2&5
\end{matrix}\right|
=5\left|\begin{matrix}
5&2&0\\
2&5&2\\
0&2&5
\end{matrix}\right|
-2^2\left|\begin{matrix}
5&2\\
2&5
\end{matrix}\right|.
$$
The first equality is obtained by Laplace expansion along the first row, while the second one is obtained by Laplace expansion along the first column. So you get a recurrence relation.
</s>