Does this pattern have anything to do with derivatives?

Yes, this has plenty to do with the derivative. In particular, what you describe is the backwards difference operator, which is just defined as $$\nabla f(n)=f(n)-f(n-1).$$ This is an operator of interest on its own, but the connection to calculus is that we can consider this as telling us the "average" slope between $n-1$ and $n$.

What you are doing is iterating the operator. In particular, one often writes $$\nabla^{k+1} f(n)=\nabla^k f(n)-\nabla^k f(n-1)$$ to meant that $\nabla^k f(n)$ is the result of applying this operator $k$ times. For instance, one has that $\nabla^3 n^3 = 6$, as you note. More generally $\nabla^k n^k = k!$, and this lets us recover a polynomial function from its table, which is what you were up to in sixth grade.

However, we can take things further by trying to interpret these numbers - and there is a natural interpretation. For instance, $\nabla^2 f(n)$ represents how quickly $f$ is "accelerating" over the interval $[n-2,n]$, since it tells us about how the average slope changes between the interval $[n-2,n-1]$ and the interval $[n-1,n]$. If we keep going, we get that $\nabla^3 f(n)$ tells us how the acceleration changes between an interval $[n-3,n-2]$ and $[n-2,n]$. We can keep going like this for physical interpretations.

However, this operator has a problem: We'd like to interpret the values as accelerations or as slopes, but $\nabla^k f(n)$ depends on the values of $f$ across the interval $[n-k,n]$. That is, it keeps taking up information from further and further away from the point of interest. The way one fixes this is to try to measure the slope over a smaller distance $h$ rather than measure it over a length of $1$: $$\nabla_h f(n)=\frac{f(n)-f(n-h)}h$$ which is now the average slope of $f$ between $n-h$ and $n$. So, if we make $h$ smaller, we start to need to know $f$ across a smaller range. This gives better meanings to higher order differences like $\nabla_h^k f(n)$, since now they only depend on a small portion of $f$.

The derivative is just what happens to $\nabla_h$ when you send $h$ to $0$. It captures only local information about the function - so, it captures instantaneous slope or instantaneous acceleration and so on. In particular, one can work out that $\nabla f(n)$ is just the average of the derivative over the interval $[n-1,n]$. One can also work out that $\nabla^2 f(n)$ is a weighted average* of the second derivative over the interval $[n-2,n]$ and $\nabla^3 f(n)$ is another weighted average of the third derivative over $[n-3,n]$.

In particular, if the $k^{th}$ derivative is constant, then it coincides with $\nabla^k f(n)$. One can also find results that if the $k^{th}$ derivative is linear, then $\nabla^k f(n)$ differs from it by at worst a constant. In particular, $\nabla$ is good at capture "global" effects (like the highest order term in a polynomial and its coefficient) but bad at capturing "local" effects (like instantaneous changes in the slope). So, in some sense, $\nabla$ is just a rough approximation of the derivative, and has similar interpretations, just doesn't work nearly as cleanly.

(*Unfortunately, "weighted average" here is hard to explain rigorously without calculus. For the benefit of readers with more background, I really mean "convolution" assuming that $f$ is actually differentiable enough times for any of this to make sense)


While I was in Algebra 2 I discovered the same exact things. Pretty cool and exiting?

Does $f(x)-f(x-1)$ have anything to do with the derivative? Kind of.

The derivative is defined as:

$$\lim_{h \to 0} \frac{f(x+h)-f(x)}{h}=f'(x)$$

Note you found:

$$f(x)-f(x-1)=\frac{f(x)-f(x-1)}{(x)-(x-1)}$$

This resembles the derivative, and is weak approximation to the derivative.

$$x^2-(x-1)^2=2x-1$$

Where as

$$\frac{d}{dx} x^2=2x$$

Concerning the other thing you are observing (the difference $n$ amount of times gives a constant expression for an $n$ degree polynomial):

Let's denote $\nabla f$ to mean the operation $f(x)-f(x-1)$. And denote $D_n(x)$ to mean a polynomial of degree $n$ with input $x$. Let $\backsim$ denote "resembles".

Then (our intuition may suggest)

$$\underbrace{\nabla \nabla \nabla..\nabla}_{n times} D_n(x) \backsim \frac{d^n}{dx^n}D_n(x)=c$$

Where $c$ is a constant. Above I used the fact that the $n$th derivative of an $n$ degree polynomial is constant.

However the proof of what you see and call "breaking down the function" does not involve calculus, you just need to prove:

$$\nabla D_n(x)=D_{n-1}(x)$$

For $n \geq 1$ using the binomial theorem.


An alternative way to think about this is to use the differential operator.

If $D=\frac{d}{dx}$, then we can observe (using Taylor Series reasoning -we'll only be applying this to polynomials, so everything will be analytic with infinite radius of convergence) that

$$ e^D f(x) = f(x+1) $$ So if $\Delta f(x) = f(x+1)-f(x)$ (we could have used the backwards difference, it works either way), then we have $$ \Delta = e^D-1 $$ and so, we have $$ \Delta^n = (e^D-1)^n = \left(\sum_{i=1}^\infty \frac{D^i}{i!}\right)^n $$ Factoring out $D^n$, we have $$ \Delta^n = \left(\sum_{i=1}^\infty \frac{D^{i-1}}{i!}\right)^nD^n $$ Now, if our $f(x)$ is a polynomial of order $n$, with leading coefficient $a$, then we end up with $$ \Delta^n f(x) = n!\left(\sum_{i=1}^\infty \frac{D^{i-1}}{i!}\right)^na $$ Now, because $a$ is a constant, any derivative will evaluate to zero. Therefore, expanding the bracketed operator term, we are only left with the leading term, which is $$ \left(\sum_{i=1}^\infty \frac{D^{i-1}}{i!}\right)^n = 1 + O(D) $$ therefore, $$ \Delta^n f(x) = n!\times a $$ Note that we can generalise this. If the polynomial is order $n+1$ instead of order $n$, with the leading terms $ax^{n+1}+bx^n$, then we have $$ \Delta^n f(x) = n!\left(\sum_{i=1}^\infty \frac{D^{i-1}}{i!}\right)^n((n+1)ax+b) $$ and the first two terms of the operator are $$ (1+D/2+O(D^2))^n = 1+nD/2 + O(D^2) $$ so we end up with $$ \Delta^n f(x) = n!(1+nD/2)((n+1)ax+b) = n!\left[(n+1)ax+b+\frac{n(n+1)}2a\right] $$ Remember, this $\Delta$ is the forward difference. If you use the backward difference, it looks a little different, but the logic still works.


What you have discovered is a part of what is called the calculus of finite differences. If all you know of $f(x)$ is the sequence $f(0), f(1), f(2), \dots$, can you find a formula for $f(n),\; (n \in \mathbb Z^+)$? Or, to be more ambitious, can you reconstruct $f(x)$? If $f(x)$ is a polynomial, you can actually reconstruct $f(x)$.

What you can do is repeatedly make a list of the differences between consecutive values. For $f(x) = x^3$ it would look like this.

\begin{matrix} 0 && 1 && 8 && 27 && 64 && 125 \dots \\ & 1 && 7 && 19 && 37 && 61\dots \\ && 6 && 12 && 18 && 24 \dots \\ &&& 6 && 6 && 6\dots \\ &&&& 0 && 0 \dots \end{matrix}

It turns out that every polynomial will eventually lead to a row of zeros and that the original polynimial can be reconstructed from the initial entry in each row, in this case from $\{0,1,6,6,\}$.

From a purely technical point of view, $f(n) - f(n-1) = \dfrac{f(n)-f(n-1)}{n - (n-1)}$ is an approximation to $f'(n)$. Finite differences concerns itself with sampling a function at points that are $\delta$ units apart, $\{f(n\delta)\}_{n=0}^N$, where $\delta$ is a small positive real number and $N$ is a large integer. It then makes calculations using $\dfrac{f(n\delta) - f((n-1)\delta)}{\delta}$ as a good approximation to $f'(n\delta)$.

You can google finite differences and find out more about it. For example https://en.wikipedia.org/wiki/Finite_difference_method is where Wikipedia's article is located.

I tried to find a certain letter to Martin Gardner in Scientific American but I could not access it without paying someone money. The letter was from a man who remembers, as a child, discovering what you have found out. He also devised a method of construction the original polynomial from the list of differences. Feeling very proud of himself, he show his results to his father, a mathematician. His father replied, in his best Quaker voice, "Why John, thee has discovered the calculus of finite differences".


Let $f(x)$ be a polynomial. Define $f_0(x)=f(x)$ and recursively $f_{n+1}(x)=f_n(x+1)-f_n(x).$

We can show that if $f$ is of degree $k$ with leading coefficient $a$, then $f_k(x)=a\cdot k!$ is a constant function. Note that $f_n=0$ for $n>k$.

We can see this is true for each $f(x)=x^k$ thus it is true for any linear combination and hence any polynomial.

For $f(x)=x^k$ we have that

$$f_k(x)=\sum_{m=0}^k {k\choose m}(-1)^m(x+m)^k.$$

Expanding $(x+m)^k$ with another binomial sum and using some identities for binomial coefficients will show that all powers of $x$ cancel out.