Power dissipated in a resistor scales with the square of the voltage across it, for a fixed resistance. In series, the supply voltage \(V\) splits equally across the \(n\) identical bulbs, so each bulb only gets \(\dfrac{V}{n}\) instead of its full rated \(V\).
Since power scales as voltage squared, each bulb's individual power drops to \(\left(\dfrac{1}{n}\right)^2\) of its rated value \(P\), which is \(\dfrac{P}{n^2}\) per bulb.
There are \(n\) such bulbs in the loop, so the total power drawn by the whole string is \(n\) times that per-bulb figure:\[ P_{\text{total}} = n\cdot\frac{P}{n^2} = \frac{P}{n} \]