The sum of an AP can be calculated using the formula $\frac{n}{2}[2a+(n-1)d]$, where $n$ is the number of terms, $a$ is the first term, and $d$ is the common difference. Setting this equal to zero, we get
\[\frac{p}{2}[2a+(p-1)d] = 0\]
Solving for $d$, we find
Show more…