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$

If n is odd, we *must* start with an odd element:

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]$

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)$