Solving for \(S(n,p)\) we have
\(
\begin{align}
S(n,0) &= n \\
S(n,1) &= {1\over 2}n+{1\over 2}n^2 \\
S(n,2) &= {1\over 6}n+{1\over 2}n^2+{1\over 3}n^3 \\
S(n,3) &= {1\over 4}n^2+{1\over 2}n^3+{1\over 4}n^4 \\
S(n,4) &= -{1\over 30}n+{1\over 3}n^3+{1\over 2}n^4+{1\over 5}n^5\\
S(n,5) &= -{1\over 12}n^2+{5\over 12}n^4+{1\over 2}n^5+{1\over 6}n^6\\
S(n,6) &= {1\over 42}n-{1\over 6}n^3+{1\over 2}n^5+{1\over 2}n^6+{1\over 7}n^7\\
\end{align}
\)
Writing these polynomials as a product between matrices gives
\(
\begin{pmatrix}
\sum_{i=1}^{n} i^0 \\
\sum_{i=1}^{n} i^1 \\
\sum_{i=1}^{n} i^2 \\
\sum_{i=1}^{n} i^3 \\
\sum_{i=1}^{n} i^4 \\
\sum_{i=1}^{n} i^5 \\
\sum_{i=1}^{n} i^6 \\
\end{pmatrix}=G_7\cdot\
\begin{pmatrix}
n \\
n^2 \\
n^2 \\
n^2 \\
n^2 \\
n^2 \\
n^2 \\
\end{pmatrix}
\qquad \text{where}\qquad
G_7=\begin{pmatrix}
1& 0& 0& 0& 0&0& 0 \\
{1\over 2}& {1\over 2}& 0& 0& 0& 0& 0 \\
{1\over 6}& {1\over 2}&{1\over 3}& 0& 0& 0& 0 \\
0& {1\over 4}& {1\over 2}& {1\over 4}& 0&0& 0 \\
-{1\over 30}& 0& {1\over 3}& {1\over 2}& {1\over 5}&0& 0 \\
0& -{1\over 12}& 0& {5\over 12}& {1\over 2}& {1\over 6}& 0 \\
{1\over 42}& 0& -{1\over 6}& 0& {1\over 2}&{1\over 2}& {1\over 7} \\ \end{pmatrix}
\)
If we invert \(G_7\) Matrix we get
\(
G_7^{-1}=\begin{pmatrix}
1& 0& 0& 0& 0& 0& 0\\
-1& 2& 0& 0& 0& 0& 0\\ 1& -3& 3& 0& 0& 0& 0\\
-1& 4& -6& 4& 0& 0& 0\\ 1& -5& 10& -10& 5& 0& 0\\
-1& 6& -15& 20& -15& 6& 0\\ 1& -7& 21& -35& 35& -21& 7\\ \end{pmatrix}
\)
In the inverted matrix, Pascal's triangle can be recognized, without the last element of each row, and with alternating signs.
More precisely, let \(A_{7}\) be the matrix obtained from Pascal's triangle by removing the last element of each row, and filling the rows by zeros on the right, that is the matrix obtained from the lower triangular Pascal matrix, filling the main diagonal by zeros and shifting up all the elements one place