OFFSET
1,1
COMMENTS
Terms are primes with final digit 3 or 7.
If k is a term, then for m=5*k the period of Fibonacci numbers mod m equals 2*(m+5). - Matthew Goers, Jan 13 2021
LINKS
Michael De Vlieger, Table of n, a(n) for n = 1..3969
Bob Bastasz, Lyndon words of a second-order recurrence, Fibonacci Quarterly (2020) Vol. 58, No. 5, 25-29.
MATHEMATICA
Select[Prime@ Range[129], Function[n, Mod[Last@ NestWhile[{Mod[#2, n], Mod[#1 + #2, n], #3 + 1} & @@ # &, {1, 1, 1}, #[[1 ;; 2]] != {0, 1} &], n] == Mod[2 (n + 1), n] ]] (* Michael De Vlieger, Mar 31 2021, after Leo C. Stein at A001175 *)
PROG
(PARI) for(n=2, 5000, t=2*(n+1); good=1; if(fibonacci(t)%n==0, for(s=0, t, if(fibonacci(t+s)%n!=fibonacci(s)%n, good=0; break); if(s>1&&s<t-1&&fibonacci(s)%n==0, cur=s; good2=1; for(ss=0, s, if(fibonacci(ss+s)%n!=fibonacci(ss)%n, good2=0; break)); if(good2, good=0; break); ); ); if(good, print1(n, ", ")))) \\ Lambert Klasen (Lambert.Klasen(AT)gmx.net), Dec 21 2004
(PARI) forprime(p=3, 3000, if(p%5==2||p%5==3, a=1; b=0; c=1; while(a!=0||b!=1, c++; d=a; a=b; a=(a+d)%p; b=d%p); if(c==(2*(p+1)), print1(p", ")))) /* V. Raman, Nov 22 2012 */
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Benoit Cloitre, Jun 04 2002
EXTENSIONS
More terms from Lambert Klasen (Lambert.Klasen(AT)gmx.net), Dec 21 2004
STATUS
approved