# Number of permutations

• Aug 18th 2011, 07:24 AM
alexmahone
Number of permutations
In how many ways can the elements of [n] be permuted so that the sum of every two consecutive elements in the permutation is odd?

[n] is the set of integers from 1 to n.

My attempt:

If n is even:
$\displaystyle n\frac{n}{2}\left(\frac{n}{2} - 1\right)\left(\frac{n}{2}-1\right)\left(\frac{n}{2}-2\right)\left(\frac{n}{2}-2\right)...=2\left(\frac{n}{2}!\right)^2$

$\displaystyle \left(\frac{n+1}{2}\right)\left(\frac{n-1}{2}\right)\left(\frac{n-1}{2}\right)\left(\frac{n-3}{2}\right)\left(\frac{n-3}{2}\right)...$$\displaystyle =\left(\frac{n+1}{2}\right)\left(\frac{n-1}{2}!\right)^2$

Is this right?
• Aug 18th 2011, 11:39 AM
Plato
Re: Number of permutations
Quote:

Originally Posted by alexmahone
In how many ways can the elements of [n] be permuted so that the sum of every two consecutive elements in the permutation is odd?
[n] is the set of integers from 1 to n.

My attempt:
If n is even:
$\displaystyle n\frac{n}{2}\left(\frac{n}{2} - 1\right)\left(\frac{n}{2}-1\right)\left(\frac{n}{2}-2\right)\left(\frac{n}{2}-2\right)...=2\left(\frac{n}{2}!\right)^2$

I agree with you as far as that goes.
But in is odd it should be: because start with an odd and alternate
$\displaystyle \left[ {\left( {\frac{{n + 1}}{2}} \right)!} \right] \cdot \left[ {\left( {\frac{{n - 1}}{2}} \right)!} \right]$
• Aug 18th 2011, 11:52 AM
alexmahone
Re: Number of permutations
Quote:

Originally Posted by Plato
I agree with you as far as that goes.
But in is odd it should be: because start with an odd and alternate
$\displaystyle \left[ {\left( {\frac{{n + 1}}{2}} \right)!} \right] \cdot \left[ {\left( {\frac{{n - 1}}{2}} \right)!} \right]$

Actually, that's exactly what I got. But there was a problem with the latex (which I've now fixed).

$\displaystyle \left(\frac{n+1}{2}\right)\left(\frac{n-1}{2}!\right)^2 = \left(\frac{n+1}{2}!\right)\left(\frac{n-1}{2}!\right)$