This paper describes the common properties of elements a and b satisfying \(ab^n = b^{n + 1}\) and \(ba^n = a^{n + 1}\) in the settings of Banach algebras, rings and operator algebras from the viewpoint of generalized inverses and spectral theory, where n is a positive integer. As applications, we show that if \(\begin{aligned} M_0 = \begin{pmatrix} T &{} 0 \\ 0 &{} N_0 \end{pmatrix}, M_1 = \begin{pmatrix} T &{} S \\ 0 &{} N_1 \end{pmatrix} \ \text {and}\ M_2 = \begin{pmatrix} T &{} 0 \\ W &{} N_2 \end{pmatrix} \end{aligned}\) are triangular operator matrices acting on the Banach space \(X \oplus X\) such that \(N_0, N_1\) and \(N_2\) are nilpotent, then many subsets of the spectrum of \(M_0\) are the same with those of \(M_1\) and \(M_2.\) Moreover, we improve some recent extensions of Jacobson’s lemma and Cline’s formula for the Drazin inverse, generalized Drazin inverse and generalized Drazin–Riesz inverse.