Given integers $h$ and $p$, is there a general way to write $f(h,p)$ such that:$$f(h,p)=\sum_{n=1}^h{n^p}$$
I know the equations for $p\leq5$:
$$f(h,1)=\sum_{n=1}^hn={h(h+1)\over2}\\f(h,2)=\sum_{n=1}^hn^2={f(h,1)(2h+1)\over3}\\f(h,3)=\sum^h_{n=1}n^3=f(h,1)^2\\f(h,4)=\sum^h_{n=1}n^4={f(h,2)(3h^2+3h-1)\over5}\\f(h,5)=\sum^h_{n=1}n^5=2f(h,2)f(h,3)$$
I cannot spot any sort of pattern.
Yes. It's called Faulhaber's formula.
Essentially,
$$f(h,p)=\frac{h^{p+1}}{p+1}+\tfrac12h^p+\sum_{k=2}^p\frac{B_k}{k!}h^{p-k+1}\prod_{i=0}^{k-2}(p-i)$$
Where $B_k$ are the Bernoulli numbers. It looks complicated, but it essentially writes $f$ as a polynomial in $h$.