OFFSET
1,3
COMMENTS
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000
FORMULA
EXAMPLE
MATHEMATICA
a[n_] := For[k = 1, True, k++, If[Divisible[Fibonacci[k, 2], n], Return[ Mod[ Fibonacci[k+1, 2], n]]]];
Array[a, 100] (* Jean-François Alcover, Jul 05 2019 *)
PROG
(PARI) a(n) = my(M=[2, 1; 1, 0]); for(k=1, 4*n/3, if((Mod(M, n)^k)[2, 1]==0, return(lift((Mod(M, n)^k)[1, 1]))))
CROSSREFS
KEYWORD
nonn
AUTHOR
Jianing Song, Jul 02 2019
STATUS
approved