Subsection Arithmetic and Geometric Rates of Change
Investigate!
Your neighborhood grocery store has a candy machine full of Skittles.
Suppose that the candy machine currently holds exactly 650 Skittles, and every time someone inserts a quarter, exactly 7 Skittles come out of the machine.
How many Skittles will be left in the machine after 20 quarters have been inserted?
Will there ever be exactly zero Skittles left in the machine? Explain.
What if the candy machine gives 7 Skittles to the first customer who put in a quarter, 10 to the second, 13 to the third, 16 to the fourth, etc. How many Skittles has the machine given out after 20 quarters are put into the machine?
Now, what if the machine gives 4 Skittles to the first customer, 7 to the second, 12 to the third, 19 to the fourth, etc. How many Skittles has the machine given out after 20 quarters are put into the machine?
Look at the sequence \((T_n)_{n\ge 1}\) which starts \(1, 3, 6, 10, 15,\ldots\text{.}\) These are called the triangular numbers since they represent the number of dots in an equilateral triangle (think of how you arrange 10 bowling pins: a row of 4 plus a row of 3 plus a row of 2 and a row of 1).
Is this sequence arithmetic? No, since \(3-1 = 2\) and \(6-3 = 3 \ne 2\text{,}\) so there is no common difference. Is the sequence geometric? No. \(3/1 = 3\) but \(6/3 = 2\text{,}\) so there is no common ratio. What to do?
Notice that the differences between terms do form an arithmetic sequence: \(2, 3, 4, 5, 6,\ldots\text{.}\) In other words, the rate of change of this sequence is arithmetic: \(T_n - T_{n-1} = n\text{,}\) which immediately gives us the recurrence relation \(T_n = T_{n-1} + n\text{.}\)
Another way to think of this is that the \(n\)th term of the sequence \((T_n)\) is the sum of the first \(n\) terms in the sequence \(1,2,3,4,5,\ldots\text{.}\) We say that \((T_n)\) is the sequence of partial sums of the sequence \(1,2,3,\ldots\) (partial sums because we are not taking the sum of all infinitely many terms).
This should become clearer if we expand the recurrence relation to write the triangular numbers like this:
\begin{align*}
T_1 = 1 \amp = 1\\
T_2 = 3 \amp = 1+2\\
T_3 = 6 \amp = 1 + 2 + 3\\
T_4 = 10 \amp = 1+ 2 + 3+ 4\\
\vdots \amp \qquad \vdots\\
T_n \amp = 1 + 2 + 3 + \cdots + n\text{.}
\end{align*}
If we know how to add up the terms of an arithmetic sequence, we could find a closed formula for a sequence whose differences are the terms of that arithmetic sequence. Consider how we could find the sum of the first 100 positive integers (that is, \(T_{100}\)). Instead of adding them in order, we regroup and add \(1+100 = 101\text{.}\) The next pair to combine is \(2+99 = 101\text{.}\) Then \(3+98 = 101\text{.}\) Keep going. This gives 50 pairs which each add up to \(101\text{,}\) so \(T_{100} = 101\cdot 50 = 5050\text{.}\)
In general, using this same sort of regrouping, we find that \(T_n = \frac{n(n+1)}{2}\text{.}\) Incidentally, this is exactly the same as \({n+1 \choose 2}\text{,}\) which makes sense if you think of the triangular numbers as counting the number of handshakes that take place at a party with \(n+1\) people: the first person shakes \(n\) hands, the next shakes an additional \(n-1\) hands and so on.
The point of all of this is that some sequences, while not arithmetic or geometric, can be interpreted as the sequence of partial sums of arithmetic and geometric sequences. Luckily there are methods we can use to compute these sums quickly.
Subsubsection Summing Arithmetic Sequences: Reverse and Add
Here is a technique that allows us to quickly find the sum of an arithmetic sequence.
Example 4.3.1.
Find the sum: \(2 + 5 + 8 + 11 + 14 + \cdots + 470\text{.}\)
Solution.
The idea is to mimic how we found the formula for triangular numbers. If we add the first and last terms, we get 472. The second term and second-to-last term also add up to 472. To keep track of everything, we might express this as follows. Call the sum \(S\text{.}\) Then,
\(S =\) |
\(2\) |
\(+\) |
\(5\) |
\(+\) |
\(8\) |
\(+ \cdots +\) |
\(467\) |
\(+\) |
470 |
\(+ \quad S =\) |
\(470\) |
\(+\) |
\(467\) |
\(+\) |
\(464\) |
\(+ \cdots +\) |
\(5\) |
\(+\) |
2 |
\(2S =\) |
\(472\) |
\(+\) |
\(472\) |
\(+\) |
\(472\) |
\(+ \cdots +\) |
\(472\) |
\(+\) |
\(472\) |
To find \(2S\) then we add 472 to itself a number of times. What number? We need to decide how many terms (summands) are in the sum. Since the terms form an arithmetic sequence, the \(n\)th term in the sum (counting \(2\) as the 0th term) can be expressed as \(2 + 3n\text{.}\) If \(2 + 3n = 470\) then \(n = 156\text{.}\) So \(n\) ranges from 0 to 156, giving 157 terms in the sum. This is the number of 472’s in the sum for \(2S\text{.}\) Thus
\begin{equation*}
2S = 157\cdot 472 = 74104\text{.}
\end{equation*}
It is now easy to find \(S\text{:}\)
\begin{equation*}
S = 74104/2 = 37052\text{.}
\end{equation*}
This will work for the sum of any arithmetic sequence. Call the sum \(S\text{.}\) Reverse and add. This produces a single number added to itself many times. Find the number of times. Multiply. Divide by 2. Done.
Example 4.3.2.
Find a closed formula for \(6 + 10 + 14 + \cdots + (4n - 2)\text{.}\)
Solution.
Again, we have a sum of an arithmetic sequence. How many terms are in the sequence? Clearly each term in the sequence has the form \(4k -2\) (as evidenced by the last term). For which values of \(k\) though? To get 6, \(k = 2\text{.}\) To get \(4n-2\) take \(k = n\text{.}\) So to find the number of terms, we must count the number of integers in the range \(2,3,\ldots, n\text{.}\) This is \(n-1\text{.}\) (There are \(n\) numbers from 1 to \(n\text{,}\) so one less if we start with 2.)
Now reverse and add:
\(S =\) |
\(6\) |
\(+\) |
\(10\) |
\(+ \cdots +\) |
\(4n-6\) |
\(+\) |
\(4n-2\) |
\(+ \quad S =\) |
\(4n-2\) |
\(+\) |
\(4n-6\) |
\(+ \cdots +\) |
\(10\) |
\(+\) |
6 |
\(2S =\) |
\(4n+4\) |
\(+\) |
\(4n+4\) |
\(+ \cdots +\) |
\(4n+4\) |
\(+\) |
\(4n+4\) |
Since there are \(n-1\) terms, we get
\begin{equation*}
2S = (n-1)(4n+4)\qquad \mbox{ so } \qquad S = \frac{(n-1)(4n+4)}{2}\text{.}
\end{equation*}
Besides finding sums, we can use this technique to find closed formulas for sequences we recognize as sequences of partial sums.
Example 4.3.3.
Use partial sums to find a closed formula for \((a_n)_{n\ge 0}\) which starts \(2, 3, 7, 14, 24, 37,\ldots \ldots\text{.}\) Assume a recurrence relation for the sequence is \(a_n = a_{n-1} + 3n-2\text{.}\)
Solution.
First, if you look at the differences between terms, you get a sequence of differences \((d_n)_{n \ge 1}\text{:}\) \(1,4,7,10,13, \ldots\text{,}\) which is an arithmetic sequence. Indeed, we notice that \(d_n = 3n-2\text{,}\) which agrees with the recurrence relation. Written another way:
\begin{align*}
a_0 \amp = 2\\
a_1 \amp = 2+1 = 2 + d_1\\
a_2 \amp = 2+1+4 = 2 + d_1 + d_2\\
a_3 \amp = 2+1+4+7 = 2 + d_1 + d_2 + d_3
\end{align*}
and so on. We can write the general term of \((a_n)\) in terms of the arithmetic sequence as follows:
\begin{equation*}
a_n = 2 + 1 + 4 + 7 + 10 + \cdots + 3n-2\text{.}
\end{equation*}
We can reverse and add, but the initial 2 does not fit our pattern. This just means we need to keep the 2 out of the reverse part:
\(a_n =\) |
\(2\) |
\(+\) |
\(1\) |
\(+\) |
\(4\) |
\(+ \cdots +\) |
\(3n-2\) |
\(+ \quad a_n =\) |
\(2\) |
\(+\) |
\(3n-2\) |
\(+\) |
\(3(n-1)-2\) |
\(+ \cdots +\) |
\(1\) |
\(2a_n =\) |
\(4\) |
\(+\) |
\(2+3n-3\) |
\(+\) |
\(2+3n-3\) |
\(+ \cdots +\) |
\(2+3n-3\) |
Not counting the first term (the 4) there are \(n\) summands of \(2+3n-3 = 3n-1\) so the right-hand side becomes \(4+(3n-1)n\text{.}\)
Finally, solving for \(a_n\) we get
\begin{equation*}
a_n = \d \frac{4+(3n-1)n}{2}\text{.}
\end{equation*}
Just to be sure, we check \(a_0 = \frac{4}{2} = 2\text{,}\) \(a_1 = \frac{4+2}{2} = 3\text{,}\) etc. We have the correct closed formula.
Notice that the closed formula for a sequence that has a arithmetic (i.e., linear) rate of change is a quadratic function. Interesting....
Subsection Higher Degree Polynomials
Investigate!
A standard \(8 \times 8\) chessboard contains 64 squares. Actually, this is just the number of unit squares. How many squares of all sizes are there on a chessboard? Start with smaller boards: \(1\times 1\text{,}\) \(2 \times 2\text{,}\) \(3\times 3\text{,}\) etc. Find a formula for the total number of squares in an \(n\times n\) board.
So far we have seen methods for finding the closed formulas for arithmetic and geometric sequences. Since we know how to compute the sum of the first \(n\) terms of arithmetic sequences, we can compute the closed formulas for sequences which have an arithmetic sequence of differences between terms. But what if we consider a sequence which is the sum of the first \(n\) terms of a sequence which is itself the sum of an arithmetic sequence?
Before we get too carried away, let’s consider an example: How many squares (of all sizes) are there on a chessboard? A chessboard consists of \(64\) squares, but we also want to consider squares of longer side length. Even though we are only considering an \(8 \times 8\) board, there is already a lot to count. So instead, let us build a sequence: the first term will be the number of squares on a \(1 \times 1\) board, the second term will be the number of squares on a \(2 \times 2\) board, and so on. After a little thought, we arrive at the sequence
\begin{equation*}
1,5,14,30, 55,\ldots\text{.}
\end{equation*}
This sequence is not arithmetic (or geometric for that matter), but perhaps it’s sequence of differences is. For differences we get
\begin{equation*}
4, 9, 16, 25, \ldots\text{.}
\end{equation*}
Not a huge surprise: one way to count the number of squares in a \(4 \times 4\) chessboard is to notice that there are \(16\) squares with side length 1, 9 with side length 2, 4 with side length 3 and 1 with side length 4. So the original sequence is just the sum of squares. Now this sequence of differences is not arithmetic since it’s sequence of differences (the differences of the differences of the original sequence) is not constant. In fact, this sequence of second differences is
\begin{equation*}
5, 7, 9, \ldots\text{,}
\end{equation*}
which is an arithmetic sequence (with constant difference 2). Notice that our original sequence had third differences (that is, differences of differences of differences of the original) constant. We will call such a sequence \(\Delta^3\)-constant. The sequence \(1, 4, 9, 16, \ldots\) has second differences constant, so it will be a \(\Delta^2\)-constant sequence. In general, we will say a sequence is a \(\Delta^k\)-constant sequence if the \(k\)th differences are constant.
Example 4.3.4.
Which of the following sequences are \(\Delta^k\)-constant for some value of \(k\text{?}\)
\(2, 3, 7, 14, 24, 37,\ldots\text{.}\)
\(1, 8, 27, 64, 125, 216, \ldots\text{.}\)
\(1,2,4,8,16,32,64,\ldots\text{.}\)
Solution.
This is the sequence from
Example 4.3.3, in which we found a closed formula by recognizing the sequence as the sequence of partial sums of an arithmetic sequence. Indeed, the sequence of first differences is
\(1,4,7, 10, 13,\ldots\text{,}\) which itself has differences
\(3,3,3,3,\ldots\text{.}\) Thus
\(2, 3, 7, 14, 24, 37,\ldots\) is a
\(\Delta^2\)-constant sequence.
These are the perfect cubes. The sequence of first differences is \(7, 19, 37, 61, 91, \ldots\text{;}\) the sequence of second differences is \(12, 18, 24, 30,\ldots\text{;}\) the sequence of third differences is constant: \(6,6,6,\ldots\text{.}\) Thus the perfect cubes are a \(\Delta^3\)-constant sequence.
If we take first differences we get \(1,2,4,8,16,\ldots\text{.}\) Wait, what? That’s the sequence we started with. So taking second differences will give us the same sequence again. No matter how many times we repeat this we will always have the same sequence, which in particular means no finite number of differences will be constant. Thus this sequence is not \(\Delta^k\)-constant for any \(k\text{.}\)
The \(\Delta^0\)-constant sequences are themselves constant, so a closed formula for them is easy to compute (it’s just the constant). The \(\Delta^1\)-constant sequences are arithmetic and we have a method for finding closed formulas for them as well. Every \(\Delta^2\)-constant sequence is the sum of an arithmetic sequence so we can find formulas for these as well. But notice that the format of the closed formula for a \(\Delta^2\)-constant sequence is always quadratic. For example, the square numbers are \(\Delta^2\)-constant with closed formula \(a_n= n^2\text{.}\) The triangular numbers (also \(\Delta^2\)-constant) have closed formula \(a_n = \frac{n(n+1)}{2}\text{,}\) which when multiplied out gives you an \(n^2\) term as well. It appears that every time we increase the complexity of the sequence, that is, increase the number of differences before we get constants, we also increase the degree of the polynomial used for the closed formula. We go from constant to linear to quadratic. The sequence of differences between terms tells us something about the rate of growth of the sequence. If a sequence is growing at a constant rate, then the formula for the sequence will be linear. If the sequence is growing at a rate which itself is growing at a constant rate, then the formula is quadratic. You have seen this elsewhere: if a function has a constant second derivative (rate of change) then the function must be quadratic.
This works in general:
Theorem 4.3.5. Polynomial Fitting.
The closed formula for a sequence will be a degree \(k\) polynomial if and only if the sequence is \(\Delta^k\)-constant (i.e., the \(k\)th sequence of differences is constant).
This tells us that the sequence of numbers of squares on a chessboard, \(1, 5, 14, 30, 55, \ldots\text{,}\) which we saw to be \(\Delta^3\)-constant, will have a cubic (degree 3 polynomial) for its closed formula.
Now once we know what format the closed formula for a sequence will take, it is much easier to actually find the closed formula. In the case that the closed formula is a degree \(k\) polynomial, we just need \(k+1\) data points to “fit” the polynomial to the data.
Example 4.3.6.
Find a formula for the sequence \(3, 7, 14, 24,\ldots\text{.}\) Assume \(a_1 = 3\text{.}\)
Solution.
First, check to see if the formula has constant differences at some level. The sequence of first differences is \(4, 7, 10, \ldots\) which is arithmetic, so the sequence of second differences is constant. The sequence is \(\Delta^2\)-constant, so the formula for \(a_n\) will be a degree 2 polynomial. That is, we know that for some constants \(a\text{,}\) \(b\text{,}\) and \(c\text{,}\)
\begin{equation*}
a_n = an^2 + bn + c\text{.}
\end{equation*}
Now to find \(a\text{,}\) \(b\text{,}\) and \(c\text{.}\) First, it would be nice to know what \(a_0\) is, since plugging in \(n = 0\) simplifies the above formula greatly. In this case, \(a_0 = 2\) (work backwards from the sequence of constant differences). Thus
\begin{equation*}
a_0 = 2 = a\cdot 0^2 + b \cdot 0 + c\text{,}
\end{equation*}
so \(c = 2\text{.}\) Now plug in \(n =1\) and \(n = 2\text{.}\) We get
\begin{equation*}
a_1 = 3 = a + b + 2
\end{equation*}
\begin{equation*}
a_2 = 7 = a4 + b 2 + 2\text{.}
\end{equation*}
At this point we have two (linear) equations and two unknowns, so we can solve the system for \(a\) and \(b\) (using substitution or elimination or even matrices). We find \(a = \frac{3}{2}\) and \(b = \frac{-1}{2}\text{,}\) so \(a_n = \frac{3}{2} n^2 - \frac{1}{2}n + 2\text{.}\)
Example 4.3.7.
Find a closed formula for the number of squares on an \(n \times n\) chessboard.
Solution.
We have seen that the sequence \(1, 5, 14, 30, 55, \ldots\) is \(\Delta^3\)-constant, so we are looking for a degree 3 polynomial. That is,
\begin{equation*}
a_n = an^3 + bn^2 + cn + d\text{.}
\end{equation*}
We can find \(d\) if we know what \(a_0\) is. Working backwards from the third differences, we find \(a_0 = 0\) (unsurprisingly, since there are no squares on a \(0\times 0\) chessboard). Thus \(d = 0\text{.}\) Now plug in \(n = 1\text{,}\) \(n =2\text{,}\) and \(n =3\text{:}\)
\begin{align*}
1 = \amp a + b + c\\
5 = \amp 8a + 4b + 2c\\
14 = \amp 27a + 9b + 3c\text{.}
\end{align*}
If we solve this system of equations we get \(a = \frac{1}{3}\text{,}\) \(b = \frac{1}{2}\) and \(c = \frac{1}{6}\text{.}\) Therefore the number of squares on an \(n \times n\) chessboard is \(a_n = \frac{1}{3}n^3 + \frac{1}{2}n^2 + \frac{1}{6}n = \frac{1}{6}n(n+1)(2n+1)\text{.}\)
Note: Since the squares-on-a-chessboard problem is really asking for the sum of squares, we now have a nice formula for \(\d\sum_{k=1}^n k^2\text{.}\)
Example 4.3.8.
Find a closed formula for \((a_n)_{n \ge 0}\) which starts \(2, 3, 7, 14, 24, 37,\ldots\text{.}\) Assume a recurrence relation for the sequence is \(a_n = a_{n-1} + 3n-2\)
Solution.
Note, we have already done this in
Example 4.3.3, but now we can solve this using polynomial fitting.
The sequence of (first) differences is \(1, 4, 7, 10, 13,\ldots\) (which agrees with what is given in the recurrence relation). The sequence of second differences is \(3, 3, 3, 3, \ldots\) constant! So we expect that the closed formula for \(a_n\) will be a degree 2 polynomial. That is, we guess,
\begin{equation*}
a_n = an^2 + bn + c\text{.}
\end{equation*}
Since \(a_0 = 2\text{,}\) we know that \(c = 2\) (as \(a\cdot 0^2 + b\cdot 0^2 + c = 2\)). Then, we can see what happens with \(n = 1\) and \(n = 2\text{:}\)
\begin{align*}
a_1 = 3 = \amp a\cdot 1^2 + b\cdot 1 + 2\\
a_2 = 7 = \amp a\cdot 2^2 + b\cdot 2 + 2\text{.}
\end{align*}
Simplifying this, we must find \(a\) and \(b\) which satisfy the equations
\begin{align*}
1 =\amp a +b\\
5 = \amp 4a + 2b\text{.}
\end{align*}
Using a computer algebra system or substitution or elimination, we find that \(a = \frac{3}{2}\) and \(b = -\frac{1}{2}\text{.}\) Therefore the closed formula is,
\begin{equation*}
a_n = \frac{3}{2}n^2 - \frac{1}{2}n + 2\text{.}
\end{equation*}
This is the same as we found in
Example 4.3.3, once you multiply out that solution.
Not all sequences will have polynomials as their closed formula. We can use the theory of finite differences to identify these.
Example 4.3.9.
Determine whether the following sequences can be described by a polynomial, and if so, of what degree.
\(\displaystyle 1, 2, 4, 8, 16, \ldots\)
\(\displaystyle 0, 7, 50, 183, 484, 1055, \ldots\)
\(\displaystyle 1,1,2,3,5,8,13,\ldots\)
Solution.
As we saw in
Example 4.3.4, this sequence is not
\(\Delta^k\)-constant for any
\(k\text{.}\) Therefore the closed formula for the sequence is not a polynomial. In fact, we know the closed formula is
\(a_n = 2^n\text{,}\) which grows faster than any polynomial (so is not a polynomial).
The sequence of first differences is \(7, 43, 133, 301, 571,\ldots\text{.}\) The second differences are: \(36, 90, 168, 270,\ldots\text{.}\) Third difference: \(54, 78, 102,\ldots\text{.}\) Fourth differences: \(24, 24, \ldots\text{.}\) As far as we can tell, this sequence of differences is constant so the sequence is \(\Delta^4\)-constant and as such the closed formula is a degree 4 polynomial.
This is the Fibonacci sequence. The sequence of first differences is \(0, 1, 1, 2, 3, 5, 8, \ldots\text{,}\) the second differences are \(1, 0, 1, 1, 2, 3, 5\ldots\text{.}\) We notice that after the first few terms, we get the original sequence back. So there will never be constant differences, so the closed formula for the Fibonacci sequence is not a polynomial.
Subsection Solving Systems of Equations with Technology
The point of polynomial fitting is that if we can be sure that a sequence has a polynomial as its closed formula, then we can find that formula. Since we know the degree of the polynomial, all we need is to find it’s coefficients, and with enough terms of the sequence, we can find a system of enough linear equations whose solution will be those coefficients. However, this requires solving a system of linear equations.
For a degree 2 polynomial, we need to find three coefficients (the constant term, the coefficient of \(n\text{,}\) and the coefficient of \(n^2\)). A system of three linear equations will be enough to find these three unknowns. In fact, since \(a_0\) will be the constant term, we can really get away with just two equations and two unknowns, and this is not difficult to solve by hand.
For higher degree polynomials, the number of equations is larger and solving by hand can be tedious. Luckily, it is easy for computers to solve these equations. Below we demonstrate how to use the free computer algebra system SageMath, as well as python, to solve these systems of equations. Besides these two choices, pretty much any computer algebra system (including Wolfram Alpha) can solve these systems of equations.
Suppose we have the following system of three equations and three unknowns, as in the chess board example above:
\begin{align*}
1 = \amp a + b + c\\
5 = \amp 8a + 4b + 2c\\
14 = \amp 27a + 9b + 3c
\end{align*}
In SageMath, we can use the solve method to solve the system of equations. Here is the code:
This is easier than in python, but python might be more readily available. One way you can solve the system in python is to use the numpy library. In this case, you would create a matrix of coefficients and a vector of constants, and then use the solve method. Here is the code:
import numpy as np
A = np.array([[1,1,1],[8,4,2],[27,9,3]])
b = np.array([1,5,14])
x = np.linalg.solve(A,b)
print(x)
An explanation of what is going on here: we creating a matrix A
of coefficients of the system of equations (not the coefficients of the closed formula we are looking for),
\begin{equation*}
A = \begin{bmatrix} 1 \amp 1 \amp 1 \\ 8 \amp 4 \amp 2 \\ 27 \amp 9 \amp 3 \end{bmatrix}
\end{equation*}
and a vector b
for the constants,
\begin{equation*}
b = \begin{bmatrix} 1 \\ 5 \\ 14 \end{bmatrix}\text{.}
\end{equation*}
What numpy does is solve the matrix equation
\begin{equation*}
Ax = b\text{.}
\end{equation*}
The vector \(x\) that satisfies this matrix equation will be the values of the unknowns in the system (so the vector \([a,b,c]\)).
Of course, once you find the coefficients of the polynomial, you should still write out the closed formula using those coefficients. It is always a good idea to check that the formula appears to work by using an \(n\) that you did not use to get your system of equations.
Exercises Additional Exercises
1.
Make up sequences that have
3, 3, 3, 3, … as its second differences.
1, 2, 3, 4, 5, … as its third differences.
1, 2, 4, 8, 16, … as its 100th differences.
2.
Consider the sequence \(1, 3, 7, 13, 21, \ldots\text{.}\) Explain how you know the closed formula for the sequence will be quadratic. Then “guess” the correct formula by comparing this sequence to the squares \(1, 4, 9, 16, \ldots\) (do not use polynomial fitting).
Solution.
\(a_n = n^2 - n + 1\text{.}\)
3.
Use a similar technique as in the previous exercise to find a closed formula for the sequence \(2, 11, 34, 77, 146, 247,\ldots\text{.}\)
Solution.
\(a_n = n^3 + n^2 - n + 1\)
4.
Generalize
Exercise 4.3.5: Find a closed formula for the sequence of differences of
\(a_n = an^2 + bn + c\text{.}\) That is, prove that every quadratic sequence has arithmetic differences.
Solution.
\(a_{n-1} = a(n-1)^2 + b(n-1) + c = an^2 - 2an + a + bn - b + c\text{.}\) Therefore \(a_n - a_{n-1} = 2an - a + b\text{,}\) which is arithmetic. Notice that this is not quite the derivative of \(a_n\text{,}\) which would be \(2an + b\text{,}\) but it is close.
5.
Can you use polynomial fitting to find the formula for the \(n\)th term of the sequence 4, 7, 11, 18, 29, 47, …? Explain why or why not.
Solution.
No. The sequence of differences is the same as the original sequence so no differences will be constant.
6.
Will the \(n\)th sequence of differences of \(2, 6, 18, 54, 162, \ldots\) ever be constant? Explain.
Solution.
No. The sequence is geometric, and in fact has closed formula \(2\cdot 3^n\text{.}\) This is an exponential function, which is not equal to any polynomial of any degree. If the \(n\)th sequence of differences was constant, then the closed formula for the original sequence would be a degree \(n\) polynomial.
7.
In their down time, ghost pirates enjoy stacking cannonballs in triangular based pyramids (aka, tetrahedrons), like those pictured here:
Note, these are solid tetrahedrons, so there will be some cannonballs obscured from view (the picture on the right has one cannonball in the back not shown in the picture, for example)
The pirates wonder how many cannonballs would be required to build a pyramid 15 layers high (thus breaking the world cannonball stacking record). Can you help?
Let \(P(n)\) denote the number of cannonballs needed to create a pyramid \(n\) layers high. So \(P(1) = 1\text{,}\) \(P(2) = 4\text{,}\) and so on. Calculate \(P(3)\text{,}\) \(P(4)\) and \(P(5)\text{.}\)
Use polynomial fitting to find a closed formula for \(P(n)\text{.}\) Show your work.
Answer the pirate’s question: how many cannonballs do they need to make a pyramid 15 layers high?
Bonus: Locate this sequence in Pascal’s triangle. Why does that make sense?