Nonnegative generalized inverses of powers of nonnegative matrices