<s>[INST] Integer sum as binomial coefficient What's the rule for expressing integer sums as binomial coefficients?  That is, for $p=1$ it is $$\sum_{n=1}^N n^p = {{N+1}\choose 2} $$
What is it for higher powers?
 [/INST] $\def\str#1#2{\left\{#1\atop#2\right\}}$
Let $\str{n}{m}$ be the Stirling number of the second kind, It can be defined by the formula
$$
X^p=\sum_{m=0}^p\str{p}{m}X(X-1)\cdots(X-m+1)\tag 1
$$
This implies that
$$\eqalign{
n^p&=\sum_{m=0}^p m!\str{p}{m}\binom{n}{m}\tag 2\cr
&=\sum_{m=0}^p m!\str{p}{m}\left(\binom{n+1}{m+1} -\binom{n}{m+1}\right)\cr
}
$$
So, taking the sum for $n=1,2,\ldots,N$ we get
$$
\sum_{n=1}^Nn^p=\sum_{m=0}^pm!\str{p}{m}\left(\binom{N+1}{m+1} -\binom{1}{m+1}\right)
$$
Noting that $\str{p}{0}=0$ for $p>0$ we conclude that
$$
\sum_{n=1}^Nn^p=\sum_{m=1}^pm!\str{p}{m} \binom{N+1}{m+1} 
$$
For $p=1$, we have $\str{1}{1}=1$, and we get the OP's formula. For $p=2$ we have
$\str{2}{1}=1$ and  $\str{2}{2}=1$, 
$$
\sum_{n=1}^Nn^2=  \binom{N+1}{2} +2\binom{N+1}{3} 
$$
and for $p=3$ we have
$\str{3}{1}=1$,  $\str{3}{2}=3$ and $\str{3}{3}=1$, hence
$$
\sum_{n=1}^Nn^3=  \binom{N+1}{2} +
6 \binom{N+1}{3} 
+6  \binom{N+1}{4} .
$$
</s>