login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

Least k such that F(k) reduced (mod prime(n)) = prime(n)-1 where F(k) is the k-th Fibonacci number.
0

%I #6 Mar 30 2012 18:39:08

%S 1,3,9,7,8,13,17,16,23,12,28,37,19,43,15,53,56,29,67,68,73,76,83,21,

%T 97,48,103,35,53,37,127,128,137,44,73,48,157,163,167,173,176,88,188,

%U 193,197,20,40,223,227,112,25,236,119,248,257,87,133,268,277,27,283,293,43

%N Least k such that F(k) reduced (mod prime(n)) = prime(n)-1 where F(k) is the k-th Fibonacci number.

%o (PARI) a(n)=if(n<0,0,s=1; while(fibonacci(s)%prime(n)<prime(n)-1,s++); s)

%K nonn

%O 1,2

%A _Benoit Cloitre_, Sep 08 2002