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

Exercise 1.2.8-4

not stated yet in Lean solution written

Rating14
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

Find every index n≥0n \ge 0 for which Fn=nF_n = n.

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

Write the first eight Fibonacci numbers and compare each with its index.

Hint 2

For large nn the Fibonacci numbers grow faster than nn. Prove Fn>nF_n > n for all n≥6n \ge 6 by induction with two previous cases.

Solution

Show the solution

The values are

nn 0 1 2 3 4 5 6 7
FnF_n 0 1 1 2 3 5 8 13

So Fn=nF_n = n holds for n=0,1,5n = 0, 1, 5, and it fails for n=2,3,4n = 2, 3, 4 because Fn<nF_n < n there.

Claim: Fn>nF_n > n for all n≥6n \ge 6. The cases n=6n = 6 and n=7n = 7 are in the table: 8>68 > 6 and 13>713 > 7. Let n≥7n \ge 7 and suppose that Fn−1>n−1F_{n-1} > n - 1 and Fn>nF_n > n. Then

Fn+1=Fn+Fn−1>n+(n−1)=2n−1≥n+1,F_{n+1} = F_n + F_{n-1} > n + (n-1) = 2n - 1 \ge n + 1,

since n≥2n \ge 2. So Fn+1>n+1F_{n+1} > n + 1, and the claim follows for all n≥6n \ge 6.

Answer: Fn=nF_n = n exactly for n=0n = 0, n=1n = 1 and n=5n = 5.

Check

Run a loop in python3 over 0≤n≤10000 \le n \le 1000 and list the nn with Fn=nF_n = n: the output is 0,1,50, 1, 5. The value F5=5F_5 = 5 is the last equality, and F6=8F_6 = 8 is already larger than 66.

Remarks

Exercise 1.2.8-5 asks the same question for Fn=n2F_n = n^2. If negative indices are allowed (Exercise 1.2.8-8), then F−n=(−1)n+1FnF_{-n} = (-1)^{n+1}F_n, and the equation Fn=nF_n = n has no root with n<0n < 0: for n=−mn = -m with m≥1m \ge 1 the left side is F−m=(−1)m+1FmF_{-m} = (-1)^{m+1}F_m, and Fm=mF_m = m only for m=1,5m = 1, 5, which give F−1=1≠−1F_{-1} = 1 \ne -1 and F−5=5≠−5F_{-5} = 5 \ne -5.

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.