3.3: The Meaning of Statements
Have you ever taken standardized tests where they give you the first few terms of a sequence and then ask you for the next one? Here are some sample questions. In each case, see if you can determine a reasonable answer for the next term.
- \(2,5,8,11,14,17,20,23,26,...\)
- \(1,1,2,3,5,8,13,21,34,55,89,144,233,377,...\)
- \(1,2,5,14,42,132,429,1430,4862,...\)
- \(2,6,12,20,30,42,56,72,90,110,...\)
- \(2,3,6,11,18,27,38,51,...\)
Pretty easy stuff! OK, now try the following somewhat more challenging sequence. Here, we'll give you a lot more terms and challenge you to find the next one.
\(1,2,3,4,1,2,3,4,5,1,2,3,4,5,2,3,4,5,6,2,3,4,5,6,1,2,3,4,5,2,3,4,5,6,…\)
Trust us when we say that we really have in mind something very concrete, and once it's explained, you'll agree that it's “obvious.” But for now, it's far from it.
Here's another danger lurking around the corner when we encounter formulas like
\(1+2+3+ \cdot \cdot \cdot +n = \dfrac{n(n+1)}{2}\).
What do the dots in this statement mean? In fact, let's consider a much simpler question. What is meant by the following expression:
\(1+2+3+\cdot \cdot \cdot +6\)
Are we talking about the sum of the first six positive integers, or are we talking about the sum of the first 19 terms from the more complicated challenge sequence given above? You are supposed to answer that you don't know, and that's the correct answer.
The point here is that without a clarifying comment or two, the notation \(1+2+3+\cdot \cdot \cdot+6\) isn't precisely defined. Let's see how to make things right.
First, let \(f: \mathbb{N} \rightarrow \mathbb{N}\) be a function. Set
\(\displaystyle \sum_{i=1}^1 f(i) = f(1)\)
and if \(n > 1\), define
\(\displaystyle \sum_{i=1}^n f(i) = f(n) + \displaystyle \sum_{i=1}^{n-1} f(i)\)
To see that these two statements imply that the expression \(\sum_{i=1}^n f(i)\) is defined for all positive integers, apply the Well Ordered Property to the set of all positive integers for which the expression is not defined and use the recursive definition to define it for the least element.
So if we want to talk about the sum of the first six positive integers, then we should write:
\(\displaystyle \sum_{i=1}^6 i\)
Now it is clear that we are talking about a computation that yields 21 as an answer.
A second example: previously, we defined \(n!\) by writing
\(n! = n \times (n-1) \times (n-2) \times \cdot \cdot \cdot \times 3 \times 2 \times 1\)
By this point, you should realize that there's a problem here. Multiplication, like addition, is a binary operation. And what do those dots mean? Here's a way to do the job more precisely. Define \(n!\) to be 1 if \(n=1\). And when \(n>1\), set \(n! = n(n-1)!\).
Definitions like these are called recursive definitions . They can be made with different starting points. For example, we could have set \(n! = 1\) when \(n=0\), and when \(n > 0\), set \(n! = n(n-1)!\).
Here's a code snippet in SageMath, which is based on Python, so this also works as Python code.
//Code
What is the value of
sumrecursive(4)
? (In order to make sure you understand how this recursive function works, calculate out
sumrecursive(4)
should be by hand before modifying the SageMath cell above.) Does it make sense to say that
sumrecursive(n)
is defined for all positive integers \(n\)? Did you recognize that this program provides a precise meaning to the expression:
\(2 + 3 + 6 + 11 + 18 + 27 + 38 + 51 + \cdot \cdot \cdot + (n^2 - 2n + 3)\)