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.

A367318 Lesser of twin primes p such that p and p+2 are both in A115591.

Original entry on oeis.org

191, 311, 1487, 1871, 2711, 2999, 3167, 3767, 4967, 5519, 7559, 8087, 10271, 11351, 11831, 13679, 15647, 18311, 18911, 21647, 22271, 22367, 23687, 25799, 26711, 27239, 27527, 27791, 29399, 29879, 31727, 31847, 33287, 34367, 35591, 38447, 38567, 40127, 40847, 42071
Offset: 1

Views

Author

Amiram Eldar, Nov 14 2023

Keywords

Comments

Primes p such that p+2 is also a prime and (p-1)/ord(2, p) = (p+1)/ord(2, p+2) = 2, where ord(2,k) is the multiplicative order of 2 modulo k.
Equivalently, lesser of twin primes p such that ord(2, p+2) = ord(2, p) + 1,
Equal consecutive values in A001917 that correspond to twin primes (p, p+2) are either 1 if p is in A319248, or 2 if p is in this sequence.
Terms are congruent to 23 modulo 24. - Jianing Song, Nov 01 2024

Crossrefs

Programs

  • Mathematica
    Select[Prime[Range[2, 4400]], PrimeQ[# + 2] && MultiplicativeOrder[2, # + 2] == MultiplicativeOrder[2, #] + 1 &]
  • PARI
    is(n) = isprime(n) && isprime(n+2) && znorder(Mod(2, n + 2)) == znorder(Mod(2, n)) + 1;