OFFSET
1,1
COMMENTS
The Mathematica coding uses the fact that the Pisano period - the period with which a Fibonacci sequence (mod n) repeats itself is not more than 6n and the fact that the Fibonacci sequence starts with 0.
Subsequence of A133246 except for 2.
Primes not in A155916. - Robert Israel, Nov 20 2016
LINKS
Robert Israel, Table of n, a(n) for n = 1..2000
MAPLE
filter:= proc(p) local a, b, i;
if not isprime(p) then return false fi;
a:= 0: b:= 1;
for i from 2 do
a, b:= b, (a+b) mod p;
if b = 0 then
if i mod 3 <> 0 then return false
elif a = 1 then return true
fi
fi
od:
end proc:
select(filter, [2, seq(i, i=3..1000, 2)]); # Robert Israel, Nov 20 2016
MATHEMATICA
Transpose[ Select[Table[{Prime[m], Select[Table[{n, Mod[Fibonacci[n], Prime[m]]}, {n, 6Prime[m] + 1}], Mod[ #[[1]], 3] != 0 && #[[2]] == 0 &]}, {m, 300}], #[[2]] == {} &]][[1]]
CROSSREFS
KEYWORD
nonn
AUTHOR
Tanya Khovanova, Oct 14 2007, Oct 17 2007, Nov 02 2007
STATUS
approved