1. The problem statement, all variables and given/known data Two n-digit integers (leading zeros allowed) are considered equivalent if one is a rearrangement of the other. (For example, 12033, 20331, and 01332 are considered equivalent five-digit integers.) If the digits 1, 3, and 7 can appear at most once, how many nonequivalent five-digit integers are there? (Problem 11 from Chapter 1.4 of Grimaldi's DISCRETE AND COMBINATORIAL MATHEMATICS) Noted for any future use it might serve. 2. Relevant equations ? 3. The attempt at a solution I know that effectively only 7 integers are being considered. That would give a base number to our solution of C(11, 5) where 7 (before the n + r -1 procedure in the combination formula) is the number of distinct items in our combination and 5 the number of repetitions. What I don't know is what to do with the remaining 3 integers. I know the answer from looking at the back of the book, but can't reason how it was derived. The answer (forgive me if my notation isn't correct): C(11, 5) + 3*C(10, 4) + 3*C(9, 3) + 3*C(8, 2) I guess the further additions after the initial C(11, 5) account for them, but I don't have the faintest idea why that is so. Thanks.