This problem is about pizza. You have a circular pizza and you want to slice it

with n straight cuts into the maximum number of pieces possible (not necessarily all
of the same size). Let Pn = this maximum number of pieces you can slice a pizza into
with n cuts. Examples are shown below.
P2 = 4 P3 = 7
Your goal: Find a formula for Pn and give a solid argument for why it works

To find a formula for Pn, let's examine the pattern in the given examples:

For P2 (2 cuts), we can make 4 pieces by making two straight cuts that intersect at the center of the pizza. This results in two semi-circular pieces and two small triangular pieces.

For P3 (3 cuts), we can make 7 pieces. Here's how:
- The first cut divides the pizza into two halves.
- The second cut intersects the first cut at the center and divides each half into two equal parts, resulting in four quarters.
- The third cut passes through all four quarters, dividing them into smaller triangular pieces.

By observing the given examples, we can deduce the following pattern:

P2 = 4
P3 = P2 + 1 + 2 = 7

Based on this pattern, we can conclude that each additional cut, starting from the third cut, adds the number of pieces equal to the number of intersections it creates with the previous cuts, plus 1.

In general, we can express this pattern as the recursive formula:

Pn = Pn-1 + intersections + 1

We need to determine the number of intersections made by the nth cut. To do this, we can use the formula for finding the number of line segment intersections in a circle, which is:

Intersections = n * (n-1) / 2

By substituting this value into our recursive formula, we get:

Pn = Pn-1 + n * (n-1) / 2 + 1

Now, we have a recursive formula, but in order to find a closed-form formula, we need to determine the initial term, P2. From the given examples, we know P2 = 4.

To summarize, the formula for Pn, the maximum number of pieces that can be sliced from a circular pizza with n straight cuts, is:

Pn = Pn-1 + n * (n-1) / 2 + 1

with the initial term P2 = 4.