Maths Olympiad Prep

Library / /399 of 860

Number theory Difficulty 5.1 AIME, harder Find the answer

The Fibonacci sequence is defined as follows: F0=0,F1=1F_{0}=0, F_{1}=1, and Fn=Fn1+Fn2F_{n}=F_{n-1}+F_{n-2} for all integers n2n \geq 2. Find the smallest positive integer mm such that Fm0(mod127)F_{m} \equiv 0(\bmod 127) and Fm+11(mod127)F_{m+1} \equiv 1(\bmod 127).

A number or a short expression. Fractions can be typed as 3/2, and spacing doesn't matter.

Solution

First, note that 5 is not a quadratic residue modulo 127. We are looking for the period of the Fibonacci numbers mod127\bmod 127. Let p=127p=127. We work in Fp2\mathbb{F}_{p^{2}} for the remainder of this proof. Let α\alpha and β\beta be the roots of x2x1x^{2}-x-1. Then we know that Fn=αnβnαβF_{n}=\frac{\alpha^{n}-\beta^{n}}{\alpha-\beta}. Note that since xxpx \rightarrow x^{p} is an automorphism and since automorphisms cycle the roots of a polynomial we have that αp=β\alpha^{p}=\beta and βp=α\beta^{p}=\alpha. Then Fp=αpβpαβ=1F_{p}=\frac{\alpha^{p}-\beta^{p}}{\alpha-\beta}=-1 and Fp+1=αββααβ=0F_{p+1}=\frac{\alpha \beta-\beta \alpha}{\alpha-\beta}=0 and similarly we obtain F2p+1=1F_{2 p+1}=1 and F2p+2=0F_{2 p+2}=0. Thus since 2p+22 p+2 is a power of 2 and since the period does not divide p+1p+1, we must have the answer is 2p+2=2562 p+2=256.

Want a route through all this instead of an archive? The track puts 2,000 problems in a working order, from AMC 10 level to the IMO shortlist.

Source: Omni-MATH, licensed Apache-2.0. Statement and solution reproduced as published; topic and difficulty added by this site.