The first number picked gives you 18 choices. That leaves 17 to choose from, so for the first two numbers you have 18*17=306 choices. Now you have 16 left, so that brings you up to 16*306=4,896 choices, and then 15*4896=73,440 for the first 4 numbers. That covers all permutations of 4 from 18. If you're only interested in the combinations (irrespective of the order) then you divide this by the number of ways you can arrange 4 different numbers, which is 24. 73,440/24=3,060.