distinct powers sequence length