The first term of the arithmetic progression is a = p and the second term is a + d = 2p, so the common difference d = p.
The nth term of an arithmetic progression is given by:
\(a_n = a + (n-1)d\)
Substituting the known values:
\(p + (n-1)p = 336\)
\(np = 336\)
The sum of the first n terms is given by:
\(S_n = \frac{n}{2} (2a + (n-1)d)\)
Substituting the known values:
\(\frac{n}{2} (2p + (n-1)p) = 7224\)
\(\frac{n}{2} (p + np) = 7224\)
Substituting \(np = 336\) into the sum equation:
\(\frac{n}{2} (p + 336) = 7224\)
Solving for n and p:
\(n(p + 336) = 14448\)
Using \(np = 336\), we have:
\(n = \frac{336}{p}\)
Substitute into the sum equation:
\(\frac{336}{p} (p + 336) = 14448\)
Solving gives:
\(336 + \frac{336^2}{p} = 14448\)
\(\frac{336^2}{p} = 14448 - 336\)
\(\frac{336^2}{p} = 14112\)
\(p = \frac{336^2}{14112}\)
\(p = 8\)
Substitute back to find n:
\(n = \frac{336}{8} = 42\)
\(Thus, the values are n = 42 and p = 8.\)