Question:
Let $f,g: \mathbb{R} \to \mathbb{R}$ be polynomials such that
$$f(n) = \frac{g(1) + g(2) + \dots + g(n)}{g(n)}$$
for all integers $n \ge 1$.
We want to find all such pairs of polynomials $(f,g)$.
Here is my attempt
WLOG $g$ is monic.
Claim 1: $f(n)=kn+d$
Proof: Define $s(k,n)=\sum_{i=0}^{n}k^i$. First we see that $s(k,n)$ is a polynomial of degree $n+1$, because we can then always look at $c\cdot(m+1)^l-c \cdot m^l$ and always choose $c$ like that for each the rate of change matches in the of $s(k,n)$. this implies that $\deg(f)=1$.
Claim 2: Let $k>0$ denote the degree of $g$, then $f(x)=\frac{x}{k+1}+\frac{k}{k+1}$
Since $g$ is monic we get for the leading coeefficient $s(m,n)$ is $\frac{1}{{{k+1}\choose{1}}}=\frac{1}{k+1}$. Furthermore for $n=1$ follows $ f(1)=1$. Hence the claim is proven.
Claim 3: $g(n)=g(1)\prod_{i=1}^{n-1}\left(\frac{k+1+i}{i}\right)$ Induction Claim 1: I've shown that $f(n) = kn + d$.
Claim 2: I've found that $f(x) = \frac{x}{k+1} + \frac{k}{k+1}$.
$f(n)g(n) - f(n-1)g(n-1) = g(n)$
$\left(kn + d\right)g(n) - \left(k(n-1) + d\right)g(n-1) = g(n)$
$kng(n) + dg(n) - k(n-1)g(n-1) - dg(n-1) = g(n)$
$kng(n) + dg(n) - kng(n-1) + kg(n-1) - dg(n-1) = g(n)$
$g(n) \left(kn + d - k(n-1) + k - d\right) = g(n)$
$k(n - n + 1 - 1) + k - d = 1$
$k(0) + k - d = 1$
$k - d = 1$
$k - d = 1$
$k - d = 1$
$d = k - 1$
$f(n) = kn + (k - 1)$
$d = k - 1$
$g(n) = g(1) \prod_{i=1}^{n-1}\left(\frac{k+1+i}{i}\right)$
$g(n) = g(1) \prod_{i=1}^{n-1}\left(\frac{k+1+i}{i}\right)$
$g(n) = g(1) \prod_{i=1}^{n-1}\left(\frac{kn + k}{i}\right)$
$g(n) = g(1) \prod_{i=1}^{n-1}\left(\frac{k(n+1)}{i}\right)$
$g(n) = g(1) \prod_{i=1}^{n-1}\left(\frac{k(n+1)}{i}\right)$
$g(n) = g(1) \left(\frac{k(n+1)}{1}\right) \left(\frac{k(n+1)}{2}\right) \left(\frac{k(n+1)}{3}\right) \ldots \left(\frac{k(n+1)}{n-1}\right)$
$g(n) = g(1) \frac{k(n+1)}{1} \cdot \frac{k(n+1)}{2} \cdot \frac{k(n+1)}{3} \cdot \ldots \cdot \frac{k(n+1)}{n-1}$
$g(n) = g(1) \cdot \frac{(k(n+1))^n}{(n-1)!}$
The main idea is if you sum a polynomial $G(n)=\sum_{i=1}^{n} g(i)=\sum_{i=1}^{n} i^k+a_{k-1}i^{k-1} \cdots a_0=\sum_{i=1}^{n} \left(i^n\right)+\sum_{i=1}^{n} \left(a_{k-1}i^{k-1}\right)\cdots \sum_{i=1}^{n} \left(a_0\right)$. but now only the sum $\sum_{i=1}^{n} \left(i^k\right)$ generates a poynomial of degree $k+1$ so also it is the only one which determines the leading coefficient. if you look at the rate of change of $\sum_{i=1}^{n} \left(i^k\right)$ it is $n^k$, which can only be produced by the highest deree term, so we look at $c\cdot (n+1)^{k+1}-c\cdot n^{k+1}$ the rate of change of the highest degree term. This is by binomial expansion $c\cdot {{k+1}\choose{1}}n^{k}+\cdots$. But $c\cdot {{k+1}\choose{1}}=1$ since else our polynomial does not match the growth of the sum. So $c=\frac{1}{{{k+1}\choose{1}}}=\frac{1}{k+1}$