Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

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

I have a list of permutations of a vector of length 24. In each position of the vector is a number between 1 and 24 and repeats are not allowed.

An online tool tells me that this will give 6.20448e+23 possible permutations.

I was wondering how many of these possible permutations have the numbers 1, 2 and 3 in the first three positions, in any order, and how to calculate this?

share|cite|improve this question
Welcome to Math.SE. Thank you for your question. We will better be able to answer it if you let us know what you've tried and any related tools you're familiar with. – vadim123 Apr 27 '13 at 17:52
related:… – vadim123 Apr 27 '13 at 17:54
up vote 1 down vote accepted

There are $3!=6$ ways to arrange the numbers $1,2$, and $3$ in the first three positions. There are then $21!$ ways to arrange the remaining $21$ numbers in the remaining $21$ positions. The total number of acceptable arrangements is therefore

$$3!\cdot21!\approx 3.065456530303\times 10^{20}\;,$$

since any arrangement of $1$-$3$ can be combined with any arrangement of $4$-$24$.

share|cite|improve this answer

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.