The formula is not known. There are a few gamers trying to figure it out by analyzing the data files.
Personnally I use the following numbers, keep in mind that I play gigantic galaxies:
PQ 20 - 250 colonist
PQ 18 - 100
PQ 17 - 75
PQ 16 - 60
PQ 15 - 50
PQ 14 - 10
when you start, the 1st objective is to find what planets to colonize so your survey ship is used to explore, send the colony ship to a cluster of stars at the edge of your range, preferably toward the center of the map and colonise there to further increase your range.
2nd objective is to re-distribute you population as evenly across your sectors
to allow sufficient population to continue expanding and to resist to invasion.
3rd is to build colony and scouts.
I try to colonize at least 2 planets per stars. Let's say there is a star with 3 planets: 20PQ, 15PQ, 14PQ. I would colonize PQ20, set it to construc a scout (4 turns), when that is finished build a colony ship, then colonize PQ15, and set it to build a scout, then a colony ship. and depending how things are going I would colonize PQ14 also, and set it to build a constructor.
If the star had been 20PQ, 14PQ, I would have colonized the 14PQ.
The main reason for 2 planets per stars is to prevent disruption to production and for protection against invasion. With that I can continue building the exensive stuff with the 20PQ, and use the 14PQ to build a defender or what ever.
Hope this helps.
~SDC~