Another entry:
With[{rule = Array[{m -> #} &, 5], sm = HoldForm@Sum[i^m, {i, 1, n}]},
Thread[Equal[sm /. rule, Factor[ReleaseHold@sm /. rule]]]] // Column // TeXForm
\begin{array}{l}
\sum _{i=1}^n i^1=\frac{1}{2} n (n+1) \\
\sum _{i=1}^n i^2=\frac{1}{6} n (n+1) (2 n+1) \\
\sum _{i=1}^n i^3=\frac{1}{4} n^2 (n+1)^2 \\
\sum _{i=1}^n i^4=\frac{1}{30} n (n+1) (2 n+1) \left(3 n^2+3 n-1\right) \\
\sum _{i=1}^n i^5=\frac{1}{12} n^2 (n+1)^2 \left(2 n^2+2 n-1\right) \\
\end{array}
Or to get rid of the 1
in i^1
With[{hd = Join[{HoldForm@Sum[i, {i, 1, n}]}, HoldForm@Sum[i^m, {i, 1, n}] /. Table[{m -> j},
{j, 2, 5}]], sm = Factor[Sum[i^m, {i, 1, n}] /. Array[{m -> #} &, 5]]},
Thread[Equal[hd, sm]]] // Column // TeXForm
\begin{array}{l}
\sum _{i=1}^n i=\frac{1}{2} n (n+1) \\
\sum _{i=1}^n i^2=\frac{1}{6} n (n+1) (2 n+1) \\
\sum _{i=1}^n i^3=\frac{1}{4} n^2 (n+1)^2 \\
\sum _{i=1}^n i^4=\frac{1}{30} n (n+1) (2 n+1) \left(3 n^2+3 n-1\right) \\
\sum _{i=1}^n i^5=\frac{1}{12} n^2 (n+1)^2 \left(2 n^2+2 n-1\right) \\
\end{array}