How big can a colony/society get?
It is not trivial to define a "colony/society". Sure, you can say "this bacterial blob is a colony", or "this ant nest is a colony", and so on, but these would be your own definitions. These systems you mention don't have definite boundaries (temporal or spatial). Although physicists like to do gross approximations to things in nature (and I'm pretty sure there is already some paper 'answering' your question), I'm not sure anyone can get a "precise relation" for a concept that even biologists struggle with (that of a "colony"). This is because at core, what you are really asking, is what is a biological individual and how can I measure it? (the individual ant, the individual colony, etc); and that's something we have no answer for. For what is worth, I recommend you read about the problem of biological individuality, which will give you no answer to your question but at least can tell you why you can't really answer it: https://link.springer.com/article/10.1162/BIOT_a_00068