A friend of mine recently showed me a number sequence he had come up with:
n | y(n) |
1 | 1 |
2 | 3 |
3 | 6 |
4 | 10 |
5 | 15 |
6 | 21 |
7 | 28 |
8 | 36 |
9 | 45 |
10 | 55 |
The basic pattern is pretty simple: to get the current number in the series, you add the last number in the series plus the current index number. Mathematically:
One thing I tried to do with the series is figure out the explicit representation. What is y as a function of n, without having to know the previous value in the series? My friend had pointed out that for the odd numbers of n, a pattern exists: 1*1=1, 2*3=6, 3*5=15, 4*7=28, etc. One of the factors increases by one each time, and the other factor increases by two each time. We can write that as:
The first term is the term that increases by two and the second term increases by one each time. When n=5, the first term is 5 and the second term is 3, which is what we want. The y(n) equation can be simplified to
This also works for the even numbers of n, which is pretty cool. Those who have taken calculus should recognize that first term. It’s the integral of n. Why is that?
If you look at the series, the numbers increase by n each time. But that only describes the change going up. What is the average change if you look up and down? At n=4, y=10. The series goes down to 6, for a change of (10-6)=4. Going up, the change is by 5 to reach the value of 15. Therefore the average change is
This is numerically the derivative of y at n=4. This pattern holds for the whole series and we can say
To get y(n), we can just integrate the derivative.
We have two ways of getting the explicit representation for the series: an algebraic method based on a unique pattern, and a more general calculus method based on the derivative.
This series reminded me of a trick a friend had shown me in high school. It turns out there is also an algebraic explanation and a more powerful calculus explanation for this trick.
Write the index numbers in a horizontal row at the top for reference and then write the series in the row underneath. Subtract each number from the one next to it. Put the difference in the row underneath and repeat. When I did that process for the series we’ve been looking at, I ended up with all 1’s.
This might make sense because the series was set up to add one more each time: add 2, then add 3, etc. Let’s do the same graph for the simple function
This time we end up with 2’s after two rounds of subtraction. Why is this? We can generalize for any number x and follow the process down.
Simplifying the final expression:
Algebraically, this shows that if you take three numbers in a row, square them, and do two rounds of subtraction, you will always get 2. But this proof only works for that function.
How about a higher power?
After three rounds, we end up with 6’s every time. We could do a similar process as before and algebraically show that the result will be 6, but that doesn’t give us a deep understanding of what’s going on. Every function of the form
will end up with a constant number after n rounds of subtraction. I calculated the remainders in Excel and here are the first five powers:
n | Remainder |
1 | 1 |
2 | 2 |
3 | 6 |
4 | 24 |
5 | 120 |
This remainder pattern in implicit terms is
which coincidentally is close to the original implicit series
The remainder pattern in explicit form is
Now for the relationship to calculus: the nth derivative of the power function is the factorial of the power:
For instance,
In other words, the remainder at the end of the graph is the nth derivative of the function. What we’ve really been doing in these graphs is numerically taking derivatives. Each subtraction has really been
with
The first round of subtraction gives the first derivative, the second round gives the second derivative, and so on. That’s why we ended up with the number 2 after two rounds for and the number 6 after three rounds for . This also explains why the remainder of the original series after two rounds was 1:
Whenever you see a trick with just numbers, try getting it into symbols. You might find an interesting connection!