  It is proved that each bounded injective bilateral weighted shift $W$
satisfying the equality $W^{*n}W^{n}=(W^{*}W)^{n}$ for some integer $n\geq 2$
is quasinormal. For any integer $n\geq 2$, an example of a bounded
non-quasinormal weighted shift $A$ on a rootless directed tree with one
branching vertex which satisfies the equality $A^{*n}A^{n}=(A^{*}A)^{n}$ is
constructed. It is also shown that such an example can be constructed in the
class of composition operators in $L^2$-spaces over $\sigma$-finite measure
spaces.
