How many rounds in a tournament?

I looked around some more and the tournaments I can find seem to be consistent with the formula floor((P+2*7)/5) limited to a maximum of 8 rounds.

This formula predicts that P=21 would be the first tournament with 7 rounds, and P=26 would be where they reach the max of 8 rounds.

EDIT: found one with P=21, and it worked! (From a three-year-old question here.)