In the 1970 MAA High School Mathematics Contest (Problem #16), students investigated this unusual recurrence relation:
Let $F(n)$ be a sequence with initial conditions $F(1) = 1, F(2) = 1, F(3) = 1$, and defined for $n \ge 3$ by:
$$F(n+1) = \frac{F(n) \cdot F(n-1) + 1}{F(n-2)}$$
Find the value of $F(6)$.
Normally, when a sequence divides by earlier terms, fractions with messy denominators quickly appear. But calculate the first few terms by hand:
Amazingly, the division is always exact! Every single term is an integer!
This phenomenon is related to the famous Somos sequences and the Laurent phenomenon in modern cluster algebras.
In this lesson, we will store the sequence in an array, compute its terms, and verify that the remainder is always zero!
F = {} F[1] = 1; F[2] = 1; F[3] = 1 for n = 3, 12 do -- Nonlinear recurrence formula (F(n)*F(n-1) + 1): Replace ???? with 1
numerator = F[n] * F[n-1] + ???? denominator = F[n-2] F[n+1] = numerator / denominator end
Move the mouse over a dotted box for more information.
Notice how the terms grow: $1, 1, 1, 2, 3, 7, 11, 26, 41, 97, 153, 362, \dots$
Even with divisions by 7, 11, and 26, the numerator is always an exact multiple of the denominator!
Now you try. Run the code above to verify $F(6) = 7$ and $F(7) = 11$. Then check Example 1 to see how changing $+1$ to $+2$ breaks the integer property!
Type your code here:
See your results here:
The code has ???? in the recurrence numerator. Replace ???? with 1 and click Run to generate the sequence and verify all remainders are 0!
Notice that remainder is $0$ at every single step, proving that every generated term is an exact integer.
Check out the examples below to see what happens when the constant $+1$ is altered, and test the famous Somos-4 sequence!
Share your code
Show a friend, family member, or teacher what you've done!