Umbral Calculus
How to use umbral calculus to find a closed form for a sequence
Using umbral calculus, we can find a closed form for a sequence by using the finite difference operator — the analogue of the derivative for sequences. I’ve written a simple script to do this, which you can try below:
Sequence:
Closed Form:
You can check the math by copying your closed form into $f(x)$ in this Desmos graph:
The finite difference operator is defined as: $$ \Delta f(x) = f(x + 1) - f(x) $$ This operator is used to find the difference between consecutive terms in a sequence. For example, if we have the sequence $1, 4, 3, 4$ based on $f(x) = x^3 - 8x^2 + 20x - 12$,
we can apply the finite difference operator to find the first difference:
$$ \Delta f(x) $$ $$ f(x + 1) - f(x) $$ $$ (x + 1)^3 - 8(x + 1)^2 + 20(x + 1) - 12 - (x^3 - 8x^2 + 20x - 12) $$ $$ 3 x^2 - 13 x + 13 $$
Naturally, the sequence based on $3 x^2 - 13 x + 13$ is the difference of the previous sequence, so we have: $3, -1, 1$.
We can continue applying the finite difference operator to find higher-order differences, which we write as $$ \Delta^n f(x) = \Delta(\Delta^{n-1} f(x)) $$
This is a linear operator: $$ \Delta (a f(x) + b g(x)) $$ $$ (a f(x + 1) + b g(x + 1)) - (a f(x) + b g(x)) $$ $$ (a f(x + 1) - a f(x)) + (b g(x + 1) - b g(x)) $$ $$ a (f(x + 1) - f(x)) + b (g(x + 1) - g(x)) $$ $$ a \Delta f(x) + b \Delta g(x) $$
This means we can apply the finite difference operator to a linear combination of functions, and it will distribute over the sum.
Lemma: If $h(x)$ is defined on the integers and $\Delta h(x) = 0$ for all $x$, then $h(x)$ is a constant function. By definition, $\Delta h(x) = h(x+1) - h(x)$, so if $\Delta h(x) = 0$ for all integers $x$, then it must be that $h(x+1) = h(x)$ for all integers $x$.
Using this lemma, we can observe that if $f$ and $g$ are functions defined on the integers and $\Delta f(x) = \Delta g(x)$, then $f(x) = g(x) + c$.
This should look familiar if you’ve seen calculus, where if $f’(x) = g’(x)$ then $f(x) = g(x) + c$.
Proof:
$\Delta f(x) = \Delta g(x) \Rightarrow \Delta f(x) - \Delta g(x) = 0 \Rightarrow \Delta[f(x) - g(x)] = 0 \Rightarrow f(x) - g(x) = c$.
WIP: This is a work in progress. I have a GitHub repo with a more complete version, including the Jackson Difference Fan.
You can learn more about umbral calculus from Vinton’s Umbral Calculus Notes