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 \mathop = 1}^n \left({\left({k-2}\right)\left({j-1}\right) + 1}\right)$

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 by induction:

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

Base Case
$\Pi(1)$ is the statement that $P \left({k, 1}\right) = 1$.

This follows directly from:

This is our base case.

Induction Hypothesis

 * $\displaystyle \forall k, r \in \N_{>0}: P \left({k, r}\right) = \sum_{j \mathop =1}^r \left({\left({k-2}\right)\left({j-1}\right) + 1}\right)$

This is our induction hypothesis.

Induction Step
This is our induction step:

So $\Pi \left({r}\right) \implies \Pi \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 \mathop = 1}^n \left({\left({k-2}\right)\left({j-1}\right) + 1}\right)$