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

Exercise 1.2.8-26

not stated yet in Lean solution written

RatingM20
MarkersM (mathematical)
KindK1, prove: show that a stated fact is true from the written solution
SectionSection 1.2.8 of Volume 1. Companion chapter: Fibonacci numbers

The task

Show that Fp≡5(p−1)/2(modp)F_p \equiv 5^{(p-1)/2} \pmod p for every odd prime pp.

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

Put n=pn = p in the formula of Exercise 1.2.8-25.

Hint 2

A prime pp divides (pk)\binom pk for 0<k<p0 < k < p. Also use Fermat's little theorem for the power 2p−12^{p-1}.

Solution

Show the solution

Put n=pn = p in Exercise 1.2.8-25 and divide by 2: 2p−1Fp=∑k odd(pk)5(k−1)/22^{p-1}F_p = \sum_{k\ \mathrm{odd}}\binom pk5^{(k-1)/2}.

For 0<k<p0 < k < p the number (pk)=p!/(k!(p−k)!)\binom pk = p!/(k!(p-k)!) is a multiple of pp, because pp divides the numerator and does not divide the denominator. So only the term with k=pk = p survives modulo pp. The number pp is odd, so k=pk = p occurs in the sum, and its term is (pp)5(p−1)/2=5(p−1)/2\binom pp5^{(p-1)/2} = 5^{(p-1)/2}. Hence

2p−1Fp≡5(p−1)/2(modp).2^{p-1}F_p \equiv 5^{(p-1)/2} \pmod p.

By Fermat's theorem 2p−1≡1(modp)2^{p-1} \equiv 1 \pmod p for odd pp. So Fp≡5(p−1)/2(modp)F_p \equiv 5^{(p-1)/2} \pmod p.

Check

For p=7p = 7: F7=13≡6F_7 = 13 \equiv 6 and 53=125≡6(mod7)5^3 = 125 \equiv 6 \pmod 7. For p=11p = 11: F11=89≡1F_{11} = 89 \equiv 1 and 55=3125≡1(mod11)5^5 = 3125 \equiv 1 \pmod{11}. For p=13p = 13: F13=233≡12F_{13} = 233 \equiv 12 and 56≡12(mod13)5^6 \equiv 12 \pmod{13}. For p=5p = 5: F5=5≡0F_5 = 5 \equiv 0 and 52≡05^2 \equiv 0.

Remarks

The residue 5(p−1)/25^{(p-1)/2} is ±1\pm1 for p≠5p \ne 5 and is the Legendre symbol (5p)\left(\frac5p\right) (Euler's criterion). Exercise 1.2.8-27 uses it to locate the multiples of pp.

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.