OFFSET
1,2
LINKS
Robert Israel, Table of n, a(n) for n = 1..1000
MAPLE
fpp:= n -> mpow(n-1, n)[2, 2]:
M:= <<0, 1>|<1, 1>>:
mpow:= proc(n, p)
if n = 0 then <<1, 0>|<0, 1>>
elif n::even then procname(n/2, p)^2 mod p
else procname((n-1)/2, p)^2 . M mod p
fi
end proc:
select(p -> fpp(p)+2 mod p = 0, [1, seq(i, i=3..10000, 3)]); # Robert Israel, Feb 01 2017
MATHEMATICA
Join[{1}, Position[Mod[Fibonacci[#], #]-#& /@ Range[10000], -2] // Flatten] (* Jean-François Alcover, Jun 09 2020 *)
PROG
(PARI) isok(k) = Mod(fibonacci(k), k) == -2; \\ Michel Marcus, Jun 09 2020
CROSSREFS
KEYWORD
nonn
AUTHOR
STATUS
approved