Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

In how many ways can the natural numbers from 1 to 10 be arranged so that no two consecutive numbers are adjacent to each other, and how is the formula arrived at?

share|cite|improve this question
Should the consecutive numbers be ordered ? I.e. the arrangement can not have $\ldots, 2, 3, \ldots$, but can it have $\ldots, 3, 2, \ldots$ ? – Sasha Jan 5 '12 at 19:32
@Sasha : no, it can't have ...,3,2,... – true blue anil Jan 5 '12 at 19:51
up vote 9 down vote accepted

This is OEIS sequence A002464. The value for $n=10$ is $479306$; the entry gives several formulas for calculating the terms. It also refers to p. 373 of Analytical Combinatorics by Flajolet and Sedgewick, which you can download here; that page gives a derivation of the ordinary generating function of the sequence.

share|cite|improve this answer
Beat me to it, good job. – Joshua Shane Liberman Jan 5 '12 at 19:55
thanks a lot for the answer and references – true blue anil Jan 6 '12 at 4:17

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.