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

Exercise 1.2.8-5

not stated yet in Lean solution written

Rating20
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=n2F_n = n^2.

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

Tabulate FnF_n and n2n^2 for nn up to about 1414 and see where they meet.

Hint 2

After the last meeting point, FnF_n stays above n2n^2. Prove this by induction from two consecutive cases, and use that n2+(n−1)2≥(n+1)2n^2 + (n-1)^2 \ge (n+1)^2 for n≥4n \ge 4.

Solution

Show the solution

The table gives FnF_n and n2n^2 for n=0,…,14n = 0, \ldots, 14.

nn 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14
FnF_n 0 1 1 2 3 5 8 13 21 34 55 89 144 233 377
n2n^2 0 1 4 9 16 25 36 49 64 81 100 121 144 169 196

Equality holds at n=0n = 0, n=1n = 1 and n=12n = 12. For 2≤n≤112 \le n \le 11 the entry FnF_n is smaller than n2n^2, and for n=13,14n = 13, 14 it is larger.

Claim: Fn>n2F_n > n^2 for all n≥13n \ge 13. The cases 1313 and 1414 are in the table. Let n≥14n \ge 14 and suppose Fn−1>(n−1)2F_{n-1} > (n-1)^2 and Fn>n2F_n > n^2. Then

Fn+1=Fn+Fn−1>n2+(n−1)2=2n2−2n+1.F_{n+1} = F_n + F_{n-1} > n^2 + (n-1)^2 = 2n^2 - 2n + 1.

Now 2n2−2n+1−(n+1)2=n2−4n=n(n−4)≥02n^2 - 2n + 1 - (n+1)^2 = n^2 - 4n = n(n-4) \ge 0, so Fn+1>(n+1)2F_{n+1} > (n+1)^2. This proves the claim.

Answer: Fn=n2F_n = n^2 exactly for n=0n = 0, n=1n = 1 and n=12n = 12 (where F12=144=122F_{12} = 144 = 12^2).

Check

A loop in python3 over 0≤n≤20000 \le n \le 2000 finds the roots 0,1,120, 1, 12 only. The value F12=144F_{12} = 144 and 122=14412^2 = 144 agree.

Remarks

Exercise 1.2.8-4 is the same question for Fn=nF_n = n. Both answers have the form "small values, then a point after which the exponential growth of FnF_n wins". The growth comes from Fn≥ϕn−2F_n \ge \phi^{n-2} (Exercise 1.2.1-4, and 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.