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.
- P=4, 3 rounds (posted before)
- P=11, 5 rounds
- P=20, 6 rounds
- P=21, 7 rounds
- P=29, 8 rounds
- P=36, 8 rounds (maybe 8 is the max?)
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.)