To form the first group, we can choose from a group of 17 people.

To form the next group, we need to consider how many people are left (17 - 6 = 11)
So, from a group of 11 people, we can have 3 people in it.

There is only one way to group the last 8 people. Thus, they are going to be 1 group.
BUT we would have overcounted because of the fact that they can be chosen in different ways. This is because they are not distinct groups or ordered groups. For example, the third group can be chosen first, the second can be chosen last, etc.
So, to counter this, we need to divide by 3!

There are 340, 340 ways.