# The Prisoner's Dilemma

### D4. Four Operations Revisited

One of the great things about mathematics is that it’s always possible to look again at familiar things and discover something new. Sometimes this can happen when you combine well-known things in a new way.

For example, you’re probably familiar with the four basic operations of addition, subtraction, multiplication, and division. And you may have heard about various number sequences, such as the powers of two: 1, 2, 4, 8, 16, and so on. In that sequence, you obtain each term by adding the previous term to itself, or in symbols ${a}_{n}={a}_{n-1}+{a}_{n-1}$. Another similar sequence is the sum recurrence, also known as the Virahāṅka or Fibonacci sequence, in which you obtain each term by adding the previous term to the one before it, which can be represented as ${b}_{n}={b}_{n-1}+{b}_{n-2}$. The sum recurrence starts 1, 2, 3, 5, 8, 13, …

This dilemma challenges you to describe the long-term behavior of four different sequences. Unlike sequences $a$ and $b$ which just add one of the last two terms unchanged to the previous one, each of these sequences uses one of the four basic operations on the last two terms to determine what to add to the previous term. But first, what is meant by “long-term behavior?” The gold standard is a closed-form formula for the sequence — an expression for the $n$th term that just involves $n,$ not previous terms. For example, the closed form for the powers of two is ${a}_{n}={2}^{n}$. If there doesn’t seem to be a closed form, maybe you can find a formula that works when $n$ is bigger than some number, but might be off for the first few values. Or sometimes you can find a formula that is never exactly right, but gets closer and closer as $n$ gets large. An example of this possibility is the formula ${b}_{n}\approx {\varphi }^{n+1}/\sqrt{5}$ for the sum recurrence, where $\varphi =\left(1+\sqrt{5}\right)/2$ is the golden ratio. All else failing, it could be one formula that’s always less than the sequence and another that is always greater — and hopefully you can get those two “bounding” formulas as close to each other as possible.

So all that said, can you describe the long term-behavior of each of the four following sequences? Each sequence starts with 1, then 2 (like $a$ and $b$ do), and thereafter adds the described quantity to the previous term to obtain the next term. If the described quantity is ever not a whole number, it should be rounded up to the next whole number.

1. One less than the sum of the previous two terms. So to obtain the third term of this sequence, you take $1+2-1=2$, and add that to 2, to get 4.
2. One more than the difference of the previous two terms. This time, the amount you add to get the third term is $2-1+1=2$, so the third term is again 4. (But don’t worry, this sequence will veer off from the first sequence soon!)
3. Half the product of the previous two terms. So in this case our next increment is $2\cdot 1/2=1$, and the third term will be 3.
4. Twice the quotient of the previous two terms. Now the next increment is $\left(2/1\right)\cdot 2=4$, and the third term will be 6.

Which of these four sequences ultimately grows the slowest? You will see that by using each operation as part of an infinite cycle, we can get new, different behaviors. Happy sequence hunting!

This problem originally appeared in the Prisoner’s Dilemma in the 2022 Winter issue of the PMP Newsletter. Solutions are no longer being accepted for this Dilemma.

Show solution?
Solution.

As submitter Jesse Waite noted, a good first step in attacking one of these sequences is to write out (in symbols) the rule defining it, known as its recurrence relation. For example, if we denote the first series connected with addition by ${c}_{0},{c}_{1},{c}_{2},\dots ,$ its recurrence relation is ${c}_{n+2}={c}_{n+1}+{c}_{n}-1+{c}_{n+1}=2{c}_{n+1}+{c}_{n}-1.$

If the formula doesn’t ring a bell, a next good thing to do is write out the first several terms: ${c}_{1}=1,$ ${c}_{2}=2$, ${c}_{3}=4$, ${c}_{4}=9$, ${c}_{5}=21$, ${c}_{6}=50$, ${c}_{7}=120$, ${c}_{8}=289$, and so on.

If the sequence still isn’t looking familiar, a good third step to try is to look at its “first difference sequence,” which just consists of the numbers you get by subtracting from each entry the one before it (you have to start from the second entry to do this). In this case, the sequence of first differences is $1,2,5,12,29,70,169,408,\dots$

And now, if you have some experience with sequences, you could recognize these numbers as the Pell sequence ${p}_{n}$, a close cousin of the familiar sum recurrence (also known as the Virahāṅka-Fibonacci sequence), in which ${p}_{n+2}=2{p}_{n+1}+{p}_{n}$ (instead of having ${b}_{n+2}={b}_{n+1}+{b}_{n}$ as in the sum recurrence). Another way you could figure this out is by taking these first differences symbolically. If we let ${c}_{n}^{\prime }={c}_{n+1}-{c}_{n},$ then
$\begin{array}{rl}{c}_{n+2}^{\prime }& ={c}_{n+3}-{c}_{n+2}=2{c}_{n+2}+{c}_{n+1}-\left(2{c}_{n+1}+{c}_{n}-1\right)\\ & =2\left({c}_{n+2}-{c}_{n+1}\right)+\left({c}_{n+1}-{c}_{n}\right)=2{c}_{n+1}^{\prime }+{c}_{n}^{\prime },\end{array}$ exactly the recurrence for the Pell sequence.

So if the first differences of our sequence ${c}_{n}$ are the Pell sequence, then our sequence must be the sum of the first $n-1$ terms of the Pell sequence (well, except possibly for an initial constant, which turns out to be one). And now you can look up or use standard linear recurrence methods to find out that the formula for ${p}_{n}$ is ${p}_{n}=\frac{\left(1+\sqrt{2}{\right)}^{n}-\left(1-\sqrt{2}{\right)}^{n}}{2\sqrt{2}}.$

We are only interested in the long term behavior, so note that since the absolute value of $1-\sqrt{2}$ is less than one, $\left(1-\sqrt{2}{\right)}^{n}$ goes to zero as $n$ grows without bound. Therefore we can ignore the second term in the numerator, and letting the constant $k=1/\left(2\sqrt{2}\right),$ we have that ${p}_{n}\approx k\left(1+\sqrt{2}{\right)}^{n}.$ Therefore, ${c}_{n}\approx k\sum _{i=0}^{n-1}\left(1+\sqrt{2}{\right)}^{i}.$ But this expression is the sum of a geometric sequence, which has a convenient formula. So ${c}_{n}\approx k\frac{\left(1+\sqrt{2}{\right)}^{n}-1}{\left(1+\sqrt{2}\right)-1}=\frac{\left(1+\sqrt{2}{\right)}^{n}-1}{4}.$

This expression gives a very good picture of the long-term behavior of the first sequence $c.$ (With a little more work along these same lines — don’t ignore the small term in the numerator and be careful with all of the constants — one can actually obtain an exact closed-form formula for ${c}_{n}.$)

Turning to the next challenge, involving subtraction, Jesse noted that the first few values of the $d$ sequence are 1, 2, 4, 7, 11, 16, 22, 29, 37, 46, … He then looked at the differences between successive numbers on this list, i.e., 2 – 1, 4 – 2, 7 – 4, and so on. That produced 1, 2, 3, 4, 5, 6, 7, etc. — a very familiar pattern! So the $d$ sequence must be related to the triangular numbers, which are the sums of the first $n$ natural numbers. The first six are 0, 1, 3, 6, 10, 15, so we can guess that each of the $d$ entries is one more than the corresponding triangular number. Since the formula for the $n$th triangular number (starting from the first being 0) is $n\left(n-1\right)/2$, we conclude that the formula we are looking for in this part of the problem is:${d}_{n}=n\left(n-1\right)/2+1.$ And indeed we can check this formula by verifying that it satisfies the specified recurrence relation:

About a year and a half after this Dilemma was originally proposed, PMP participant William Keehn sent in a successful approach to understanding the third sequence, ${e}_{n+2}={e}_{n+1}\cdot \left({e}_{n}+2\right)/2$. He reasoned that when dealing with a lot of multiplication, it’s often helpful to take logarithms. In particular, because the number 2 appears twice in the recurrence for ${e}_{n}$, William decided to use logs base two, and set ${l}_{n}={\mathrm{log}}_{2}{e}_{n}$ (so that also ${e}_{n}={2}^{{l}_{n}}$). He calculated that the sequence of ${l}_{n}$ values starts and so on.

These numbers are looking very reminiscent of the familiar Virahāṅka-Fibonacci (VF) sequence ${b}_{n}$ mentioned in the statement of the problem. That resemblance turns out to be no surprise: if we take log base 2 of both sides of the recurrence for ${e}_{n}$, we get ${l}_{n+2}={l}_{n+1}+{\mathrm{log}}_{2}\left({e}_{n}+2\right)-1.$ We still would like to get rid of the remaining ${e}_{n}$ in this expression to put it entirely in terms of the $l$ sequence, so we use a technique known as Standard Expert Trick #367: Add zero.

The key to using this trick is to find the right term to both add and subtract (in effect, adding zero) to simplify this expression. In our case, we would like an ${l}_{n}$ term, so we try adding $0={l}_{n}-{\mathrm{log}}_{2}\left({e}_{n}\right)$ to get ${l}_{n+2}={l}_{n+1}+{l}_{n}-1+{\mathrm{log}}_{2}\left(\left({e}_{n}+2\right)/{e}_{n}\right)$. As $\left({e}_{n}+2\right)/{e}_{n}=1+2/{e}_{n}=1+{2}^{1-{l}_{n}}$, we convert back to natural log to take advantage of the series expansion of $\mathrm{ln}\left(1+x\right)$ near $x=0$:

We can see from this expression and the initial values above that the ${l}_{n}$ are growing rapidly, like the VF series, so all of the terms in parentheses become large negative powers of two, and quickly become entirely negligible. In other words, as $n$ grows, ${l}_{n+2}\to {l}_{n+1}+{l}_{n}-1$. More directly, we observe that ${l}_{4}>{b}_{2}+1$ and ${l}_{5}>{b}_{3}+1$, and that if ${l}_{n+1}>{b}_{n-1}+1$ and ${l}_{n}>{b}_{n-2}+1$, then ${l}_{n+2}>{l}_{n+1}+{l}_{n}-1>{b}_{n-1}+1+{b}_{n-2}+1-1={b}_{n}+1$. So by induction, we conclude that for all $n>3$, ${l}_{n}>{b}_{n-2}+1$. (Moreover, using the estimates above we can actually show that ${l}_{n}\to {b}_{n-2}+1$ as $n$ grows.) In any case, converting back to the original series, we have our lower bound (which turns out to be very close in the long run): ${e}_{n}>{2}^{{b}_{n-2}+1}.$

Jesse Waite cracked the fourth sequence. Examining the first several terms was again the key: they are 1, 2, 6, 12, 16, 19, 22, 25. etc. In this case, the successive differences seem to be settling down to always be equal to three. And looking at the recurrence verifies this: once two successive entries ${f}_{n}$ and ${f}_{n+1}$ are at least seven and differ by three, then ${f}_{n+1}/{f}_{n}$ is between 1 and 1.5. Therefore $2{f}_{n+1}/{f}_{n}$ is between 2 and 3, which means ${f}_{n+2}=3+{f}_{n+1}$, and so the next pair also differ by three (and are still at least seven) and the pattern continues. Hence, as Jesse concluded, ${f}_{n}=3n+1$ for $n>4$.

We are now in a position to answer the final question of Dilemma 4: which sequence grows the slowest? Looking at all the expressions we derived, ${c}_{n}$ grows exponentially. Multiplying out the exact formula ${d}_{n}={n}^{2}/2-n/2+1$ shows that it grows quadratically. Except for a few terms at the beginning, ${f}_{n}$ is linear. And since the VF sequence itself grows exponentially, ${e}_{n}$ is the monster of the lot and grows double-exponentially.

Of these, division produces the slowest-growing sequence. To be sure, PMP participant Robert Noll sent a letter pointing out (a) guessing that division leads to slow growth would have been a good bet right from the start, and (b) we didn’t need an asymptotically correct formula for ${e}_{n}$ to see that it couldn’t be the slowest growing: It is very easy to prove the much weaker lower bound that ${e}_{n}>{2}^{n-2}$, which already makes it grow faster than any quadratic function, let alone linear.

Nevertheless, in figuring out at least decent approximations for each of these series, and exact formulas where possible, we encountered many different problem-solving techniques. That’s a lot of mileage from just the four basic arithmetic operations!