His initial question says permutations. Some basic logic says combination. If he is using it for something like lottery numbers, permutations would ONLY be relevant for calculating the odds of a given sequence occuring, however using some basic statistics can resolve finding the odds without physically generating each permutation then evaluating it. I hate to speak on the OP's behalf, but I think the OP could produce vastly more optimal code by just doing combos.

