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-9

Exercise 1.2.8-9

not stated yet in Lean solution written

RatingM20
MarkersM (mathematical)
KindK2, decide: say whether a claim holds from the written solution
SectionSection 1.2.8 of Volume 1. Companion chapter: Fibonacci numbers

The task

Decide which of the equations (4), (6), (14) and (15) remain true when the subscripts may be any integers, with FnF_n defined for negative nn as in Exercise 1.2.8-8.

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

A sequence indexed by all integers that satisfies un+2=un+1+unu_{n+2} = u_{n+1} + u_n is fixed by two consecutive values, in both directions.

Hint 2

For (4), (6) and (14), show that both sides satisfy the recurrence and agree at two consecutive places. For (15), try n=−1n = -1.

Solution

Show the solution

A sequence (un)n∈ℤ(u_n)_{n \in \mathbb Z} with un+2=un+1+unu_{n+2} = u_{n+1} + u_n for all integers nn is fixed by u0u_0 and u1u_1: the rule gives un+2u_{n+2} from un+1u_{n+1} and unu_n, and it gives un=un+2−un+1u_n = u_{n+2} - u_{n+1} for the way down. Two such sequences that agree at 00 and 11 are equal.

Eq. (14), Fn=(ϕn−ϕ^n)/5F_n = (\phi^n - \hat\phi^n)/\sqrt5. The sequence un=(ϕn−ϕ^n)/5u_n = (\phi^n - \hat\phi^n)/\sqrt5 is defined for all integers, because ϕϕ^=−1\phi\hat\phi = -1 so neither number is zero. Both ϕ\phi and ϕ^\hat\phi satisfy x2=x+1x^2 = x + 1, so multiplication by xnx^n gives xn+2=xn+1+xnx^{n+2} = x^{n+1} + x^n for all integers nn. Hence (un)(u_n) satisfies the rule. Also u0=0u_0 = 0 and u1=(ϕ−ϕ^)/5=1u_1 = (\phi - \hat\phi)/\sqrt5 = 1. So un=Fnu_n = F_n for all integers nn. Eq. (14) holds.

Eq. (4), Fn+1Fn−1−Fn2=(−1)nF_{n+1}F_{n-1} - F_n^2 = (-1)^n. Let DnD_n be the left side. Using Fn+2=Fn+1+FnF_{n+2} = F_{n+1} + F_n and Fn+1−Fn=Fn−1F_{n+1} - F_n = F_{n-1}, which are true for all integers,

Dn+1=Fn+2Fn−Fn+12=Fn2+Fn+1(Fn−Fn+1)=Fn2−Fn+1Fn−1=−Dn.D_{n+1} = F_{n+2}F_n - F_{n+1}^2 = F_n^2 + F_{n+1}(F_n - F_{n+1}) = F_n^2 - F_{n+1}F_{n-1} = -D_n.

Also D0=F1F−1−F02=1D_0 = F_1F_{-1} - F_0^2 = 1. The relation Dn+1=−DnD_{n+1} = -D_n moves up and down from n=0n = 0, so Dn=(−1)nD_n = (-1)^n for all integers nn. Eq. (4) holds.

Eq. (6), Fn+m=FmFn+1+Fm−1FnF_{n+m} = F_mF_{n+1} + F_{m-1}F_n. Fix mm and let both sides be sequences in nn. Both satisfy the rule: the right side is a combination of the shifted sequences Fn+1F_{n+1} and FnF_n. At n=0n = 0 the two sides are FmF_m and FmF1+Fm−1F0=FmF_mF_1 + F_{m-1}F_0 = F_m. At n=1n = 1 they are Fm+1F_{m+1} and FmF2+Fm−1F1=Fm+Fm−1=Fm+1F_mF_2 + F_{m-1}F_1 = F_m + F_{m-1} = F_{m+1}. So eq. (6) holds for all integers mm and nn.

Eq. (15), FnF_n is ϕn/5\phi^n/\sqrt5 rounded. This fails for every n<0n < 0. For n=−1n = -1: ϕ−1/5=0.2764…\phi^{-1}/\sqrt5 = 0.2764\ldots rounds to 00, but F−1=1F_{-1} = 1. For n≤−1n \le -1 in general: 0<ϕn/5≤ϕ−1/5<1/20 < \phi^n/\sqrt5 \le \phi^{-1}/\sqrt5 < 1/2, so the rounded value is 00, while Fn=±F−n≠0F_n = \pm F_{-n} \ne 0. For n≥0n \ge 0 eq. (15) holds as in the text.

Answer: (4), (6) and (14) hold for all integers. (15) holds only for n≥0n \ge 0.

Check

With python3 and exact fractions in ℚ(5)\mathbb Q(\sqrt5), or with floating point and nn from −10-10 to 1010: Dn=(−1)nD_n = (-1)^n for all those nn, and eq. (6) holds for all pairs (m,n)(m, n) in that range. For n=−3n = -3: ϕ−3/5=0.1056…\phi^{-3}/\sqrt5 = 0.1056\ldots, which rounds to 00, but F−3=2F_{-3} = 2.

Remarks

The reason for the failure of (15) is that ϕ^n\hat\phi^n is small only for positive nn. For negative nn the term ϕ^n/5\hat\phi^n/\sqrt5 is the large one, and it carries the value of FnF_n. In general the nearest-integer rule is Fn=ϕn/5−ϕ^n/5F_n = \phi^n/\sqrt5 - \hat\phi^n/\sqrt5 with the second term of size less than 1/21/2 for n≥0n \ge 0 only. See the C1 chapter on Section 1.2.8.

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.