# How many ways are there to permute the integers from 1 to 1000 under the condition that two consecutive numbers must have different parity?

How many ways are there to permute the integers from 1 to 1000 under the condition that two consecutive numbers must have different parity?

I know that there are two possible cases: either the sequence starts with an even or it is starts with an odd. Then the sequence alternates parity all the way through.

But I am not sure how to mathematically count the permutations of evens and permutations of odds. Like what formula do I use?

• Hint: The answer will be equal to 2 x (number of ways to arrange 500 (even) numbers) x (number of ways to arrange 500 (odd) numbers). And of course the 2nd and 3rd of those numbers are equal. – Paul Jan 21 '20 at 17:07

Of the $$1000$$ integers from $$1$$ to $$1000$$, half (i.e. $$500$$) of them are even and the other half are odd. Also, one only needs to know three things: the permutation of the even numbers, the permutation of the odd numbers, and whether the first term is even or odd. The answer is therefore $$2 \cdot (500!)^2$$.