On random tridiagonal matrices and the beta log-gas