Are there methods for "recovering" a sequence $a_n$ if we are given that $\sum_{k=0}^{f(x)} a_k = x$ for all $x$? Are there methods for "recovering" a non-constant sequence $a_n$ if we are given that $$\sum_{k=0}^{f(x)} a_k = x$$ for all $x$ for a provided $f$? I have a gut feeling that any such methods would give asymptotic solutions (and I'm okay with that, if any methods exist). Do restrictions on $f$ (e.g. $f$ is given to be polynomial and of reasonable degree) allow for any methods to exist?
 A: We should have $f : A \to \{-1, 0, 1, 2, \ldots\}$ where $A$ is some countable subset of an abelian group $G \supseteq \{a_i \mid i \geq 0\}$ (for instance, it sounds like you want $G = \mathbb{R}$ based on the comments).  Also, $f$ must be one-to-one.  This is all required for the assumption to be consistent.
If the function $f$ is not onto (see note 2 below for one exception), then there is some $a_i$ we cannot determine.
If the function $f$ is onto, then it has an inverse, and we can write
$$\sum_{i=0}^n a_i = f^{-1}(n)$$
for all $n \in \{-1, 0, 1, 2, \ldots\}$, which in turn gives
$$a_n = f^{-1}(n) - f^{-1}(n-1)$$ for all $n \in \{0, 1, 2, \ldots\}.$

(1) The only thing you could possibly relax is the codomain of $f$, but this couldn't be relaxed much, and any changes you make would make the final result slightly harder to state without any gain.
(2) $-1$ doesn't need to be in the range of $f$, but in this case, just define $f^{-1}(-1) = 0$.  It might no longer be a true inverse of $f$, but the identities I've quoted still work with this change.
