how you got to the rule in the first place:
Arithmetic progression: \(1,~ 3,~ 5,~ 7,~\ldots\)
\(\begin{array}{|rcll|} \hline a_n &=& a_1+(n-1)*d \quad | \quad a_1 = 1,~ d=2 \\ a_n &=& 1+(n-1)*2 \\ a_n &=& 1+2n -2 \\ a_n &=& 2n-1 \\ 2n &=& a_n + 1 \\ n &=& \dfrac{a_n+1}{2} \quad \text{or} \quad n = \dfrac{x+1}{2}\\ \hline \end{array}\)
source: https://en.wikipedia.org/wiki/Arithmetic_progression
\(\dots~ y = 5n\)
The Lucas sequence is the sequence \(1,~ 3,~ 4,~ 7,~ 11,~\dots\)
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, \({\color{red}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, \(\dots\) (sequence A106291 in the OEIS)
Source: https://en.wikipedia.org/wiki/Pisano_period
\(\begin{array}{|r|r|r|} \hline n &\text{Lucas numbers} \quad L(n) & L(n)\pmod{20} \\ \hline 1 &1 & \color{blue}1\\ 2 &3 & \color{blue}3 \\ 3 &4 &\color{blue}4\\ 4 &7 &\color{blue}7\\ 5 &11& \color{blue}11\\ 6 &18 &\color{blue}18\\ 7 &29 &\color{blue}9\\ 8 &47 &\color{blue}7\\ 9 &76 &\color{blue}16\\ 10 &123 &\color{blue}3\\ 11 &199&\color{blue}19\\ \color{red}12 &322&\color{blue}2\\ \hline 13 &521& 1\\ 14 &843 &3\\ 15 &1364&4\\ 16 &2207&7\\ \ldots & \ldots & \ldots \\ \hline \end{array}\)
Lucas number \(\pmod{20}\) cycle is \(\begin{array}{rrrrrrrrrrrrr} \text{period} & \{ 1,&3,&4,&\color{red}7,&11,&18,&9,&7,&16,&3,&19,&2\} \\ \text{index} & \{ 1,&2,&3&\color{red}4,&5,&6,&7,&8,&9,&10,&11,&0(12)\} \\ \end{array}\)
The cycle length is \( \color{red}12\).
cycle index for \(L(100) \pmod{20}\) is \(100 \pmod{12} ={\color{red} 4}\)
\(L(100) \pmod{20} = \color{red}7\)
The remainder when the 100th term of the sequence is divided by 20 is 7