Determine the spectrum of $B$ (the square matrix of order $q$ with coefficient $(i,j)$ equal to 1 if $|i-j|=1$ and 0 otherwise) and a basis of eigenvectors of $B$.
Determine the spectrum of $B$ (the square matrix of order $q$ with coefficient $(i,j)$ equal to 1 if $|i-j|=1$ and 0 otherwise) and a basis of eigenvectors of $B$.