The colonies that will be used to cluster will be the five closest to either your home world or your bottom cluster. For example starting with your outer colonies you have :
Gas
Barren
Barren
Barren
Gas
Barren
C1
The bottom here includes a gas so you would need to plunder that gas and have all barrens lined up above your c1. Same principal goes for making c2, and c3.