cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A023163 Numbers k such that Fibonacci(k) == -2 (mod k).

This page as a plain text file.
%I A023163 #19 May 11 2021 11:24:28
%S A023163 1,9,39,111,129,159,201,249,321,471,489,519,591,681,831,849,879,921,
%T A023163 951,1041,1119,1191,1329,1401,1569,1641,1671,1689,1761,1839,1929,1959,
%U A023163 2031,2049,2199,2271,2319,2361,2391,2481,2559,2631,2649,2721,2841,2991,3039
%N A023163 Numbers k such that Fibonacci(k) == -2 (mod k).
%H A023163 Robert Israel, <a href="/A023163/b023163.txt">Table of n, a(n) for n = 1..1000</a>
%p A023163 fpp:= n -> mpow(n-1,n)[2,2]:
%p A023163 M:= <<0,1>|<1,1>>:
%p A023163 mpow:= proc(n,p)
%p A023163   if n = 0 then <<1,0>|<0,1>>
%p A023163   elif n::even then procname(n/2,p)^2 mod p
%p A023163   else  procname((n-1)/2,p)^2 . M mod p
%p A023163   fi
%p A023163 end proc:
%p A023163 select(p -> fpp(p)+2 mod p = 0, [1, seq(i,i=3..10000,3)]); # _Robert Israel_, Feb 01 2017
%t A023163 Join[{1}, Position[Mod[Fibonacci[#], #]-#& /@ Range[10000], -2] // Flatten] (* _Jean-François Alcover_, Jun 09 2020 *)
%o A023163 (PARI) isok(k) = Mod(fibonacci(k), k) == -2; \\ _Michel Marcus_, Jun 09 2020
%Y A023163 Cf. A000045.
%K A023163 nonn
%O A023163 1,2
%A A023163 _David W. Wilson_