In this paper, we study periodic tridiagonal Toeplitz matrices with perturbed corners. By using some matrix transformations, the Schur complement and matrix decompositions techniques, as well as the Sherman-Morrison-Woodbury formula, we derive explicit determinants and inverses of these matrices. One feature of these formulas is the connection with the famous Mersenne numbers. We also propose two algorithms to illustrate our formulas.