$T$ self-adjoint on Hilbert space $H$, $T^n=T^{n+1}$ will $T$ be an orthogonal projection operator? I have seen several answers and proofs here at MSE that a self-adjoint operator $T$ on a Hilbert space $H$ where $T^2=T$, implies $T$ being an orthogonal projection operator. 
The thought struck me; what would happen if the condition $T^2=T$ is replaced by $T^3=T^2$ or instead by $T^4=T^3$ or why not more generally by $T^n=T^{n+1}$ for some $n\in\mathbb{N}$? Would this still imply $T$ to be an orthogonal projection operator?
I guess someone must have thought of this before me? In that case perhaps there is a reference in the literature for this or perhaps the proof is way simpler than I might expect?
 A: A selfadjoint operator $T$ has the property that $\mathcal{N}(T)=\mathcal{N}(T^2)$ because $$\|Tx\|^2=\langle T^2x,x\rangle \le \|T^2x\|\|x\|.$$ Therefore, if $T^{n+1}=T^{n}$, then $T^{n}(T-I)=0$ implies $T(T-I)=0$, which is the condition for an orthogonal projection.
A: $T$ is orthogonally diagonalisable, i.e., $T=U^*DU$, where $D$ is diagonal and $U$ orthogonal.
If $T^n=T^{n+1}$, for some $n$, then, $D^{n+1}=D^n$, and hence every diagonal element $\lambda$ satisfies $\lambda^n=\lambda^{n+1}$, and thus $\lambda\in\{0,1\}$. So all the eigenvalues of $D$ are ones or zeroes and therefore $T$ is an orthogonal projection.
A: For $n = 0$, the condition $T^{n+1} = T^n$ says $T = \operatorname{id}$, so $T$ is an orthogonal projection. For $n \geqslant 1$, the condition yields $T^n = T^{n+1} = T^{(n+1) + 1} = T^{n+2} = \dotsc = T^{2n} = (T^n)^2$, so $T^n$ is an orthogonal projection. But if $T^n$ is the orthogonal projection onto $S$, then $T^n = T^{n+1}$ says $T\lvert_S = \operatorname{id}_S$, and since $T$ is self-adjoint, $S^{\perp}$ is a $T$-invariant subspace too. And $T\lvert_{S^{\perp}}$ is then a self-adjoint nilpotent operator, hence $T\lvert_{S^{\perp}} = 0$. But then $T = T^n$ is the orthogonal projection onto $S$.
