Some mathematical preliminaries: the factorial of a positive integer n is denoted n! and its value is

n! = n(n-1)(n-2)...(3)(2)(1).

So, for example, 8! = 8x7x6x5x4x3x2x1 = 40320. And for reasons that we needn't bother with here, we define 0! = 1. (That may not make sense, but neither do all those well-documented Elvis sightings in alien space craft, and we have no problem with that. I would simply ask that you expand your willing suspension of disbelief to encompass the idea that 0! = 1.) n! is the number of ways you can rearrange (permute) n objects (letters, residues, ...).

The factorial is also used to compute the binomial coefficients, and now would be a good time to pay attention, because these things are important. If you have a drawer filled with n socks, and you want k of them, the following binomial coefficient answers the question: How many ways can we pick k socks (residues) from the drawer (gene) of n socks (residues)?

So, for example, the number of ways of choosing 3 residues out of 7 is 7! / (3! 4!) = 35. And the number of ways of choosing 0 (or 7) residues out of 7 is 7! / (0! 7!) = 1.

Ok, on the next page is a little shocked movie that will help us answer the following question: what is the probability that a gene composed of 5 amino acid residues will have exactly 2 of its residues filled with either the A,C or D codons? The first thing we have to answer is: how many ways can we fill exactly 2 of its residues with either the A,C or D codons (and the remaining 3 residues with letters from the remaining 17 letter codon alphabet)?