Closed Form for Polygonal Numbers

Theorem
Let $P \left({k, n}\right)$ be the $n$th $k$-gonal number.

Then $\displaystyle P \left({k, n}\right) = \sum_{j=1}^n \left({\left({k-2}\right)\left({j-1}\right) + 1}\right)$

Hence the closed-form expression for $P \left({k, n}\right)$ is:
 * $\displaystyle P \left({k, n}\right) = \frac {n \left({2 + \left({n-1}\right)\left({k-2}\right)}\right)} 2$

Proof
We have that:

$P \left({k, n}\right) = \begin{cases} 0 & : n = 0 \\ P \left({k, n-1}\right) + \left({k-2}\right) \left({n-1}\right) + 1 & : n > 0 \end{cases}$

Proof of Summation Formula
Proof by induction:

For all $n \in \N^*$, let $P \left({n}\right)$ be the proposition:
 * $\displaystyle P \left({k, n}\right) = \sum_{j=1}^n \left({\left({k-2}\right)\left({j-1}\right) + 1}\right)$

Basis for the Induction

 * $P(1)$ is true, as this just says $P \left({k, 1}\right) = 1$.

This follows directly from:

This is our basis for the induction.

Induction Hypothesis

 * Now we need to show that, if $P \left({r}\right)$ is true, where $r \ge 2$, then it logically follows that $P \left({r+1}\right)$ is true.

So this is our induction hypothesis:


 * $P \left({k, r}\right) = \sum_{j=1}^r \left({\left({k-2}\right)\left({j-1}\right) + 1}\right)$

Then we need to show:


 * $P \left({k, r+1}\right) = \sum_{j=1}^{r+1} \left({\left({k-2}\right)\left({j-1}\right) + 1}\right)$

Induction Step
This is our induction step:

So $P \left({r}\right) \implies P \left({r+1}\right)$ and the result follows by the Principle of Mathematical Induction.

Therefore:
 * $\displaystyle \forall n \in \N: P \left({k, n}\right) = \sum_{j=1}^n \left({\left({k-2}\right)\left({j-1}\right) + 1}\right)$

Proof of Closed Form
$\displaystyle \sum_{j=1}^n \left({\left({k-2}\right)\left({j-1}\right) + 1}\right)$ is the sum of the arithmetic progression where:
 * The initial term $a$ is $1$
 * the common difference $d$ is $k-2$

The result follows immediately.