The Lucas sequence is the sequence 1, 3, 4, 7, 11, …
where the first term is 1,
the second term is 3 and each term after that is the sum of the previous two terms.
What is the remainder when the 100th term of the sequence is divided by 20?
In number theory, the nth Pisano period, written p(n), is the period with which
the sequence taken modulo n repeats.
The Pisano periods of Lucas numbers are
1, 3, 8, 6, 4, 24, 16, 12, 24, 12,
10, 24, 28, 48, 8, 24, 36, 24, 18, 12,
16, 30, 48, 24, 20, 84, 72, 48, 14, 24,
30, 48, 40, 36, 16, 24, 76, 18, 56, 12,
40, 48, 88, 30, 24, 48, 32, … (sequence A106291 in the OEIS)
Source: https://en.wikipedia.org/wiki/Pisano_period
nLucas numbersL(n)L(n)(mod20)11123334447751111618187299847797616101233111991912322213521114843315136441622077………
Lucas number (mod20) cycle is period{1,3,4,7,11,18,9,7,16,3,19,2}index{1,2,34,5,6,7,8,9,10,11,0(12)}
The cycle length is 12.
cycle index for L(100)(mod20) is 100(mod12)=4
L(100)(mod20)=7
The remainder when the 100th term of the sequence is divided by 20 is 7