Skip to main content
Logo image

Section 4.3 Polynomial Sequences

Subsection Section Preview

Investigate!
A standard 8Γ—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Γ—1, 2Γ—2, 3Γ—3, etc. Find a formula for the total number of squares in an nΓ—n board.
We have seen that arithmetic sequences grow at a constant rate, and so their closed formulas are linear functions. What about sequences that grow faster? What if their rate of change (really the differences between terms) is itself growing at a constant rate?
In Section 4.2 we claimed that the triangular numbers, the sum of the first n positive integers, have closed formula
Tn=n(n+1)2=n22+n2.
So this sequence, whose sequence of differences is arithmetic, is a degree 2 polynomial (a quadratic function).
Our goal in this section is to explore this phenomenon. We will verify that this really is the closed formula for the triangular numbers, extend it to other sequences with arithmetic differences, and then explore sequences that grow at even faster rates.

Worksheet Preview Activity

1.
While wandering the halls of the math department, you find yourself staring at the captivating artwork shown below.
A square array of dots with L-shaped lines separating collections of odd numbers of dots.
(b)
We can also compute the total number of dots by summing each β€œhook” region, from smallest to largest:
+ + + + + .
(c)
Yet another way to calculate the total number of dots is to group the terms of this sum.
1+11= ; 3+9= ; 5+7= .
Since there are three pairs of sums, the total is 3β‹… = .
(d)
If we generalize the diagram, so it has n hooks, how many dots will be in the largest hook?
How many dots will be in the second largest hook?
(e)
What will the sum of the smallest and largest hooks be?
What will the sum of the second smallest and second largest hooks be?
(f)
If we continue adding pairs of hooks (next smallest plus next largest), how many pairs will we have?
Multiplying then, the total number of dots will be: .
Hint.
Let’s assume that n is even. If it wasn’t, then there would be a single β€œmiddle” hook that isn’t added to anything, but this is counteracted by the fact that n/2 would count a half hook sum.

Subsection Summing Arithmetic Sequences: Reverse and Add

Let’s find the sum of the first n positive integers carefully. Call that sum Tn, and write it down twice, once in the usual order and once in reverse order.
Tn=1+2+3+β‹―+n+Tn=n+(nβˆ’1)+(nβˆ’2)+β‹―+12Tn=n+1+n+1+n+1+β‹―+n+1
We then added the two equations together. The left-hand side is 2Tn. On the right-hand side, something great happens: All the terms of the sum are the same! So instead of adding up a bunch of different numbers, we now just add a bunch of the same number. That’s a task that multiplication lives for! There are n terms in the sum, so we get,
2Tn=n(n+1).
Solving for Tn gives us,
Tn=n(n+1)2,
as expected.
This technique will work for any arithmetic sum.

Example 4.3.1.

Find the sum: 2+5+8+11+14+β‹―+470.
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. Then,
S= 2 + 5 + 8 +β‹―+ 467 + 470
+S= 470 + 467 + 464 +β‹―+ 5 + 2
2S= 472 + 472 + 472 +β‹―+ 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 nth term in the sum (counting 2 as the 0th term) can be expressed as 2+3n. If 2+3n=470 then n=156. 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. Thus
2S=157β‹…472=74104.
It is now easy to find S:
S=74104/2=37052.
This will work for the sum of any arithmetic sequence. Call the sum S. 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+β‹―+(4nβˆ’2).
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. To get 4nβˆ’2 take k=n. So to find the number of terms, we must count the number of integers in the range 2,3,…,n. This is nβˆ’1. (There are n numbers from 1 to n, so one less if we start with 2.)
Now reverse and add:
S= 6 + 10 +β‹―+ 4nβˆ’6 + 4nβˆ’2
+S= 4nβˆ’2 + 4nβˆ’6 +β‹―+ 10 + 6
2S= 4n+4 + 4n+4 +β‹―+ 4n+4 + 4n+4
Since there are nβˆ’1 terms, we get
2S=(nβˆ’1)(4n+4) so S=(nβˆ’1)(4n+4)2.
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 (an)nβ‰₯0 which starts 2,3,7,14,24,37,……. Assume a recurrence relation for the sequence is an=anβˆ’1+3nβˆ’2.
Solution.
First, if you look at the differences between terms, you get a sequence of differences (dn)nβ‰₯1: 1,4,7,10,13,…, which is an arithmetic sequence. Indeed, we notice that dn=3nβˆ’2, which agrees with the recurrence relation. Written another way:
a0=2a1=2+1=2+d1a2=2+1+4=2+d1+d2a3=2+1+4+7=2+d1+d2+d3
and so on. We can write the general term of (an) in terms of the arithmetic sequence as follows:
an=2+1+4+7+10+β‹―+3nβˆ’2.
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:
an= 2 + 1 + 4 +β‹―+ 3nβˆ’2
+an= 2 + 3nβˆ’2 + 3(nβˆ’1)βˆ’2 +β‹―+ 1
2an= 4 + 2+3nβˆ’3 + 2+3nβˆ’3 +β‹―+ 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.
Finally, solving for an we get
an=4+(3nβˆ’1)n2.
Just to be sure, we check a0=42=2, a1=4+22=3, etc. We have the correct closed formula.
Notice that the closed formula for a sequence that has an arithmetic (i.e., linear) rate of change is a quadratic function. Interesting....

Subsection Higher Degree Polynomials

Since we know how to compute the sum of the first n terms of arithmetic sequences, we can compute the closed formulas for sequences that have an arithmetic sequence of differences between terms. But what if we consider a sequence that is the sum of the first n terms of a sequence that is itself the sum of an arithmetic sequence?
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Γ—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Γ—1 board, the second term will be the number of squares on a 2Γ—2 board, and so on. After a little thought, we arrive at the sequence
1,5,14,30,55,….
This sequence is not arithmetic (or geometric for that matter), but perhaps its sequence of differences is. For differences we get
4,9,16,25,….
Not a huge surprise: One way to count the number of squares in a 4Γ—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 its sequence of differences (the differences of the differences of the original sequence) is not constant. In fact, this sequence of second differences is
5,7,9,…,
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 Ξ”3-constant. The sequence 1,4,9,16,… has second differences constant, so it will be a Ξ”2-constant sequence. In general, we will say a sequence is a Ξ”k-constant sequence if the kth differences are constant.

Example 4.3.4.

Which of the following sequences are Ξ”k-constant for some value of k?
  1. 2,3,7,14,24,37,….
  2. 1,8,27,64,125,216,….
  3. 1,2,4,8,16,32,64,….
Solution.
  1. 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,…, which itself has differences 3,3,3,3,…. Thus 2,3,7,14,24,37,… is a Ξ”2-constant sequence.
  2. These are the perfect cubes. The sequence of first differences is 7,19,37,61,91,…; the sequence of second differences is 12,18,24,30,…; the sequence of third differences is constant: 6,6,6,…. Thus the perfect cubes are a Ξ”3-constant sequence.
  3. If we take first differences, we get 1,2,4,8,16,…. 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 Ξ”k-constant for any k.
The Ξ”0-constant sequences are themselves constant, so a closed formula for them is easy to compute (it’s just the constant). The Ξ”1-constant sequences are arithmetic, and we have a method for finding closed formulas for them as well. Every Ξ”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 Ξ”2-constant sequence is always quadratic. For example, the square numbers are Ξ”2-constant with closed formula an=n2. The triangular numbers (also Ξ”2-constant) have closed formula an=n(n+1)2, which when multiplied out gives you an n2 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 might 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:
This tells us that the sequence of numbers of squares on a chessboard, 1,5,14,30,55,…, which we saw to be Ξ”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,…. Assume a1=3.
Solution.
First, check to see if the formula has constant differences at some level. The sequence of first differences is 4,7,10,… which is arithmetic, so the sequence of second differences is constant. The sequence is Ξ”2-constant, so the formula for an will be a degree 2 polynomial. That is, we know that for some constants a, b, and c,
an=an2+bn+c.
Now to find a, b, and c. First, it would be nice to know what a0 is, since plugging in n=0 simplifies the above formula greatly. In this case, a0=2 (work backward from the sequence of constant differences). Thus
a0=2=aβ‹…02+bβ‹…0+c,
so c=2. Now plug in n=1 and n=2. We get
a1=3=a+b+2
a2=7=a4+b2+2.
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=32 and b=βˆ’12, so an=32n2βˆ’12n+2.

Example 4.3.7.

Find a closed formula for the number of squares on an nΓ—n chessboard.
Solution.
We have seen that the sequence 1,5,14,30,55,… is Ξ”3-constant, so we are looking for a degree 3 polynomial. That is,
an=an3+bn2+cn+d.
We can find d if we know what a0 is. Working backward from the third differences, we find a0=0 (unsurprisingly, since there are no squares on a 0Γ—0 chessboard). Thus d=0. Now plug in n=1, n=2, and n=3:
1=a+b+c5=8a+4b+2c14=27a+9b+3c.
If we solve this system of equations, we get a=13, b=12 and c=16. Therefore the number of squares on an nΓ—n chessboard is an=13n3+12n2+16n=16n(n+1)(2n+1).
Note: Since the squares-on-a-chessboard problem is really asking for the sum of squares, we now have a nice formula for βˆ‘k=1nk2.

Example 4.3.8.

Find a closed formula for (an)nβ‰₯0 which starts 2,3,7,14,24,37,…. Assume a recurrence relation for the sequence is an=anβˆ’1+3nβˆ’2
Solution.
Note that 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,… (which agrees with what is given in the recurrence relation). The sequence of second differences is 3,3,3,3,… constant! So we expect that the closed formula for an will be a degree 2 polynomial. That is, we guess,
an=an2+bn+c.
Since a0=2, we know that c=2 (as aβ‹…02+bβ‹…02+c=2). Then, we can see what happens with n=1 and n=2:
a1=3=aβ‹…12+bβ‹…1+2a2=7=aβ‹…22+bβ‹…2+2.
Simplifying this, we must find a and b which satisfy the equations
1=a+b5=4a+2b.
Using a computer algebra system or substitution or elimination, we find that a=32 and b=βˆ’12. Therefore the closed formula is,
an=32n2βˆ’12n+2.
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.
  1. 1,2,4,8,16,…
  2. 0,7,50,183,484,1055,…
  3. 1,1,2,3,5,8,13,…
Solution.
  1. As we saw in Example 4.3.4, this sequence is not Ξ”k-constant for any k. Therefore the closed formula for the sequence is not a polynomial. In fact, we know the closed formula is an=2n, which grows faster than any polynomial (so is not a polynomial).
  2. The sequence of first differences is 7,43,133,301,571,…. The second differences are: 36,90,168,270,…. Third differences: 54,78,102,…. Fourth differences: 24,24,…. As far as we can tell, this sequence of differences is constant so the sequence is Ξ”4-constant, and as such the closed formula is a degree 4 polynomial.
  3. This is the Fibonacci sequence. The sequence of first differences is 0,1,1,2,3,5,8,…, the second differences are 1,0,1,1,2,3,5…. 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.

Warning 4.3.10.

A degree n polynomial is completely determined by its n+1 coefficients (the +1 is because of the constant term). Therefore we can always find a degree n polynomial when given n+1 terms of a sequence.
If we take the n+1 terms, we can take differences of differences of differences of... until (after n steps) we are left with just a single number. As far as we can tell, this nth difference is constant. This doesn’t mean we have found the closed formula for the right sequence. This is why it is so important to work with sequences in a particular context.

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 its 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, and the coefficient of n2). A system of three linear equations will be enough to find these three unknowns. In fact, since a0 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:
1=a+b+c5=8a+4b+2c14=27a+9b+3c
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:
An explanation of what is going on here: We create a matrix A of coefficients of the system of equations (not the coefficients of the closed formula we are looking for),
A=[1118422793]
and a vector b for the constants,
b=[1514].
What numpy does is solve the matrix equation
Ax=b.
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.

Reading Questions Reading Questions

1.

2.

Suppose (an) is a sequence whose sequence of differences has a degree 2 polynomial as its closed formula. What can you say about the sequence of partial sums of (an)? Explain.

3.

What questions do you have? Write at least one question about the content of this section that you or a classmate might be curious about after reading this section.

Exercises Practice Problems

1.

Consider the sequence 10,14,18,22,26,… with a1=10.
  1. Which of the following is a recursive definition for the sequence. Select all that apply.
  2. Give a closed formula for the nth term of the sequence.
    an=
  3. Is 2030 a term in the sequence?
  4. How many terms does the finite sequence 10,14,18,22,26,…,550 have?
  5. Find the sum: 10+14+18+22+26+β‹―+550
  6. Use what you found above to find bn, the nth term of 5,15,29,47,69,… where b0=5.

5.

Find 6+17+28+39+β‹―+3823 using a technique from this section.

6.

Use polynomial fitting to find the formula for the nth term of the sequence (an)nβ‰₯0 which starts,
0,5,14,27,44,65,…
an=

7.

Use polynomial fitting to find the formula for the nth term of the sequence (an)nβ‰₯0 which starts,
βˆ’1,2,7,14,23,34,…
an=

8.

Use polynomial fitting to find the formula for the nth term of the sequence (an)nβ‰₯0 which starts,
βˆ’1,4,18,50,109,204,…
an=

9.

Use polynomial fitting to find the formula for the nth term of the sequence (an)nβ‰₯1 which starts,
5,36,107,236,441,… Note the first term above is a1, not a0.
an=

10.

Suppose Suppose an=3n2βˆ’3nβˆ’5. Find a closed formula for the sequence of differences by computing anβˆ’anβˆ’1. Simplify your answer as much as posible.
anβˆ’anβˆ’1=

11.

Use polynomial fitting to find the formula for the nth term of the sequence (an)nβ‰₯1 which starts,
8,34,84,164,280,… Note the first term above is a1, not a0.
an=

Exercises Additional Exercises

1.

Your friendly neighborhood bodega has a candy machine that gives 7 Skittles to the first customer who puts in a quarter, 10 to the second, 13 to the third, 16 to the fourth, etc. How many candies has the machine given out in total after 20 quarters are put into the machine? After n quarters?

2.

Not to be outdone, the mega-mart across the street has installed a candy machine that 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 in total after 20 quarters are put into the machine? After n quarters?

3.

Make up sequences that have
  1. 3, 3, 3, 3, … as its second differences.
  2. 1, 2, 3, 4, 5, … as its third differences.
  3. 1, 2, 4, 8, 16, … as its 100th differences.

4.

Consider the sequence 1,3,7,13,21,…. 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,… (do not use polynomial fitting).

5.

Use a similar technique as in the previous exercise to find a closed formula for the sequence 2,11,34,77,146,247,….

6.

Consider the sequence 2,7,15,26,40,57,… (with a0=2). By looking at the differences between terms, express the sequence as a sequence of partial sums. Then find a closed formula for the sequence by computing the nth partial sum.

7.

If you have enough toothpicks, you can make a large triangular grid. Below, are the triangular grids of size 1 and of size 2. The size 1 grid requires 3 toothpicks, the size 2 grid requires 9 toothpicks.
Three toothpicks arranged as the sides of an equilateral triangle.
Nine toothpicks arranged into a triangle with two toothpicks forming each edge, and an upside-down triangle in the center.
  1. Let tn be the number of toothpicks required to make a size n triangular grid. Write out the first 5 terms of the sequence t1,t2,….
  2. Find a recursive definition for the sequence. Explain why you are correct.
  3. Is the sequence arithmetic or geometric? If not, is it the sequence of partial sums of an arithmetic or geometric sequence? Explain why your answer is correct.
  4. Use your results from part (c) to find a closed formula for the sequence. Show your work.

8.

If you were to shade in an nΓ—n square on graph paper, you could do it the boring way (with sides parallel to the edge of the paper) or the interesting way, as illustrated below:
One square.
Five squares arranged as a plus sign. Viewed another way, the squares are arranged in three centered rows of 1, 3, and 1 squares.
13 squares arranged in five centered rows, containing 1, 3, 5, 3, and 1 square each.
25 squares arranged in rows of length 1, 3, 5, 7, 5, 3, and 1.
The interesting thing here is that a 3Γ—3 square now has area 13. Our goal is to find a formula for the area of an nΓ—n (diagonal) square.
  1. Write out the first few terms of the sequence of areas (assume a1=1, a2=5, etc). Is the sequence arithmetic or geometric? If not, is it the sequence of partial sums of an arithmetic or geometric sequence? Explain why your answer is correct, referring to the diagonal squares.
  2. Use your results from part (a) to find a closed formula for the sequence. Show your work. Note that while there are lots of ways to find a closed formula here, you should use partial sums specifically.
  3. Find the closed formula in as many other interesting ways as you can.

9.

Generalize Practice Problem 5: Find a closed formula for the sequence of differences of an=an2+bn+c. That is, prove that every quadratic sequence has arithmetic differences.

10.

Can you use polynomial fitting to find the formula for the nth term of the sequence 4, 7, 11, 18, 29, 47, …? Explain why or why not.

11.

Will the nth sequence of differences of 2,6,18,54,162,… ever be constant? Explain.

12.

In their down time, ghost pirates enjoy stacking cannonballs in triangular based pyramids (aka, tetrahedrons), like those pictured here:
A single shaded circle (meant to represent a cannonball)
Four overlapping circles, drawn to represent cannonballs stacked with a layer of three in a triangle with a single cannonball resting on top.
Overlapping circles drawn to represent a three-dimensional tetrahedron of balls consisting of a triangle of 6 balls supporting a triangle of 3, with a single ball balanced on top.
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?
  1. Let P(n) denote the number of cannonballs needed to create a pyramid n layers high. So P(1)=1, P(2)=4, and so on. Calculate P(3), P(4), and P(5).
  2. Use polynomial fitting to find a closed formula for P(n). Show your work.
  3. Answer the pirate’s question: How many cannonballs do they need to make a pyramid 15 layers high?
  4. Bonus: Locate this sequence in Pascal’s triangle. Why does that make sense?
You have attempted 1 of 17 activities on this page.