taocp

This site has no text of the book. Keep your own copy of TAOCP next to it. See what is checked.

Exercise · Volume 1 · 1.2.8-13

Exercise 1.2.8-13

not stated yet in Lean solution written

RatingM22
MarkersM (mathematical)
KindK3, find a value: compute a number, a set or a closed form from the written solution
SectionSection 1.2.8 of Volume 1. Companion chapter: Fibonacci numbers

The task

Express in terms of Fibonacci numbers (a) the sequence with arbitrary start values r,sr, s and the Fibonacci rule, and (b) the sequence with start 0,10, 1 and the rule with a constant cc added.

The exact wording is in your copy of the book.

Hints

Open one hint at a time. Try the exercise again after each.

Hint 1

For (a), the sequence is a combination of two solutions that you know.

Hint 2

For (b), find a constant shift that removes cc from the rule.

Solution

Show the solution

(a) The sequences Fn−1F_{n-1} and FnF_n both satisfy the Fibonacci rule for n≥1n \ge 1. So does un=rFn−1+sFnu_n = rF_{n-1} + sF_n, because the rule is linear. At n=1n = 1 and n=2n = 2 the values are u1=rF0+sF1=su_1 = rF_0 + sF_1 = s and u2=rF1+sF2=r+s=a2u_2 = rF_1 + sF_2 = r + s = a_2. Since a1=sa_1 = s and a2=r+sa_2 = r + s too, the two sequences agree from n=1n = 1 on, and

an=rFn−1+sFn(n≥1).a_n = rF_{n-1} + sF_n \qquad (n \ge 1).

For n=0n = 0 the formula needs F−1=1F_{-1} = 1 (Exercise 1.2.8-8), and then it gives a0=ra_0 = r.

(b) Put cn=bn+cc_n = b_n + c. Then cn+2=bn+2+c=(bn+1+c)+(bn+c)=cn+1+cnc_{n+2} = b_{n+2} + c = (b_{n+1} + c) + (b_n + c) = c_{n+1} + c_n. So (cn)(c_n) follows the Fibonacci rule, with c0=cc_0 = c and c1=1+cc_1 = 1 + c. By part (a) with r=cr = c and s=1+cs = 1 + c,

cn=cFn−1+(1+c)Fn=Fn+c(Fn+Fn−1)=Fn+cFn+1.c_n = cF_{n-1} + (1 + c)F_n = F_n + c(F_n + F_{n-1}) = F_n + cF_{n+1}.

Hence

bn=Fn+c (Fn+1−1).b_n = F_n + c\,(F_{n+1} - 1).

Check of the start: b0=0+c(1−1)=0b_0 = 0 + c(1 - 1) = 0 and b1=1+c(1−1)=1b_1 = 1 + c(1 - 1) = 1.

Check

For r=3r = 3, s=−5s = -5 the rule gives 3,−5,−2,−7,−9,−163, -5, -2, -7, -9, -16, and 3Fn−1−5Fn3F_{n-1} - 5F_n gives −5⋅1+3⋅0=−5-5 \cdot 1 + 3 \cdot 0 = -5, 3⋅1−5⋅1=−23 \cdot 1 - 5 \cdot 1 = -2, 3⋅1−5⋅2=−73 \cdot 1 - 5 \cdot 2 = -7, 3⋅2−5⋅3=−93 \cdot 2 - 5 \cdot 3 = -9, 3⋅3−5⋅5=−163 \cdot 3 - 5 \cdot 5 = -16 for n=1,…,5n = 1, \ldots, 5. For (b) with c=2c = 2: bn=0,1,3,6,11,19b_n = 0, 1, 3, 6, 11, 19 and Fn+2(Fn+1−1)F_n + 2(F_{n+1} - 1) gives 0,1,3,6,11,190, 1, 3, 6, 11, 19.

Remarks

The case c=1c = 1 of (b) gives bn=Fn+2−1b_n = F_{n+2} - 1, which is the sum of Exercise 1.2.8-20 in disguise. The shift used in (b) works for every constant forcing term. For forcing terms that depend on nn, see Exercises 1.2.8-12, 1.2.8-14 and 1.2.8-15.

This solution is checked, and a person has not reviewed it yet. The source.

In Lean

not stated yet The exercise is not stated in Lean yet.

The status is computed from the Lean build. The node of the map.

Something is wrong? Report it.