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.

A091317 Primes p that divide 2^n+1 for some n.

Original entry on oeis.org

2, 3, 5, 11, 13, 17, 19, 29, 37, 41, 43, 53, 59, 61, 67, 83, 97, 101, 107, 109, 113, 131, 137, 139, 149, 157, 163, 173, 179, 181, 193, 197, 211, 227, 229, 241, 251, 257, 269, 277, 281, 283, 293, 307, 313, 317, 331, 347, 349, 353, 373, 379, 389, 397, 401, 409, 419, 421, 433
Offset: 1

Views

Author

N. J. A. Sloane, Feb 21 2004

Keywords

Comments

From Charles R Greathouse IV, Feb 13 2009: (Start)
Essentially the same as A014662.
Also primes p for which p^2 divides 2^n+1 for some n. If p | 2^g + 1, then 2^g = kp - 1 for some k, so 2^gp = (kp - 1)^p = (-1)^p + (-1)^(p-1) * kp * (p choose 1) + ... and so 2^gp = -1 (mod p^2). (End)

Crossrefs

Complement in primes of A014663.
Cf. A014662. - Charles R Greathouse IV, Feb 13 2009

Programs

  • Maple
    2, op(select(t -> isprime(t) and numtheory:-order(2,t)::even, [seq(2*i+1, i=1..1000)])); # Robert Israel, Aug 12 2015
  • Mathematica
    Join[{2}, Select[Prime[Range[100]], EvenQ[MultiplicativeOrder[2, #/ (2^IntegerExponent[#, 2])]]&]] (* Jean-François Alcover, Sep 02 2018 *)
  • PARI
    isA091317(p)=!bitand(znorder(Mod(2,p)),1) \\ Charles R Greathouse IV, Feb 13 2009

Formula

Has density 17/24 (Hasse 1966).