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).

Original entry on oeis.org

1, 9, 39, 111, 129, 159, 201, 249, 321, 471, 489, 519, 591, 681, 831, 849, 879, 921, 951, 1041, 1119, 1191, 1329, 1401, 1569, 1641, 1671, 1689, 1761, 1839, 1929, 1959, 2031, 2049, 2199, 2271, 2319, 2361, 2391, 2481, 2559, 2631, 2649, 2721, 2841, 2991, 3039
Offset: 1

Views

Author

Keywords

Crossrefs

Cf. A000045.

Programs

  • 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 *)
  • PARI
    isok(k) = Mod(fibonacci(k), k) == -2; \\ Michel Marcus, Jun 09 2020