OFFSET
1,2
COMMENTS
When a(n)=2, n is often prime. The exceptions (323, 377, 2834, ...) are in A069107.
LINKS
Michael De Vlieger, Table of n, a(n) for n = 1..10000
EXAMPLE
a(3) = 2 because Fibonacci(3+2) - Fibonacci(3) = 5 - 2 == 0 (mod 3) and 2 is the smallest integer for which this is true.
MATHEMATICA
Array[Block[{k = 1}, While[Mod[Fibonacci[# + k], #] != Mod[Fibonacci@ #, #], k++]; k] &, 80] (* Michael De Vlieger, Dec 17 2017 *)
PROG
(MuPAD) for n from 1 to 100 do an := 0; repeat an := an+1; until (numlib::fibonacci(n+an)-numlib::fibonacci(n)) mod n = 0 end_repeat; print(an); end_for;
(PARI) a(n) = {my(k = 1); while(Mod(fibonacci(n + k), n) != Mod(fibonacci(n), n), k++); k; } \\ Michel Marcus, Dec 18 2017
CROSSREFS
KEYWORD
nonn
AUTHOR
Stefan Steinerberger, Nov 13 2005
STATUS
approved