%I #29 Sep 08 2022 08:44:47
%S 1,7,18,42,138,162,258,282,378,402,498,594,618,642,714,762,978,1002,
%T 1242,1338,1362,1578,1674,1698,1842,1938,2082,2202,2298,2658,2778,
%U 2802,2922,3018,3138,3282,3378,3522,3642,3858,3882,4098,4362,4458,4554,4674,4698
%N Numbers k such that Fibonacci(k) == -8 (mod k).
%C Equivalently, k divides Fibonacci(k) + 8.
%H Chai Wah Wu, <a href="/A023166/b023166.txt">Table of n, a(n) for n = 1..10000</a>
%p with(combinat, fibonacci):
%p select(n->(fibonacci(n) + 8) mod n = 0,[$1..10^4 ]); # _Muniru A Asiru_, Jan 28 2018
%t Select[Range[5000],Divisible[Fibonacci[#]+8,#]&] (* _Harvey P. Dale_, Mar 26 2011 *)
%o (PARI) isok(n) = ((fibonacci(n)+8) % n) == 0; \\ _Michel Marcus_, Jan 27 2018
%o (Magma) [n: n in [1..5*10^3] | (Fibonacci(n)+8) mod n eq 0 ]; // _Vincenzo Librandi_, Jan 27 2018
%o (GAP) Filtered([1..10^4], n -> (Fibonacci(n) + 8) mod n = 0); # _Muniru A Asiru_, Jan 28 2018
%Y Cf. A000045.
%K nonn
%O 1,2
%A _David W. Wilson_