Recursionmedium
0:00.0

The Fibonacci sequence modulo 5 is defined by anan1+an2(mod5)a_n \equiv a_{n-1} + a_{n-2} \pmod{5} with a0=1,a1=1a_0 = 1, a_1 = 1. Compute the sequence until it repeats the pair (ai,ai+1)=(1,1)(a_i, a_{i+1}) = (1, 1). What is the period (Pisano period modulo 5)?