Parity index of binary words and powers of prime words