Generalized inverses of certain Toeplitz matrices