OFFSET
1,1
COMMENTS
Primes p such that both p - 2 and p are both in A001122.
Apart from the first term, all terms are congruent to 13 mod 24, since terms in A006512 are congruent to 1 mod 6 apart from the first one, and terms in A001122 are congruent to 3 or 5 mod 8.
Note that "there are infinitely many pairs of twin primes" and "there are infinitely many primes with primitive root 2" are two famous and unsolved problems, so a stronger conjecture implying both of them is that this sequence is infinite.
Also note that a pair of cousin primes can't both appear in A001122, while a pair of sexy primes can.
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000 (terms 1..406 from Jianing Song)
EXAMPLE
11 and 13 is a pair of twin primes both having 2 as a primitive root, so 13 is a term.
59 and 61 is a pair of twin primes both having 2 as a primitive root, so 61 is a term.
Although 137 and 139 is a pair of twin primes, 139 has 2 as a primitive root while 137 doesn't, so 139 is not a term.
MATHEMATICA
Select[Prime[Range[2^11]], PrimeQ[# - 2] && PrimitiveRoot[# - 2] == 2 && PrimitiveRoot[#] == 2 &] (* Amiram Eldar, May 02 2023 *)
PROG
(PARI) forprime(p=3, 10000, if(znorder(Mod(2, p))==p-1 && znorder(Mod(2, p+2))==p+1, print1(p+2, ", ")))
(Python)
from itertools import islice
from sympy import isprime, nextprime, is_primitive_root
def A319249_gen(): # generator of terms
p = 2
while (p:=nextprime(p)):
if isprime(p+2) and is_primitive_root(2, p) and is_primitive_root(2, p+2):
yield p+2
CROSSREFS
KEYWORD
nonn
AUTHOR
Jianing Song, Sep 15 2018
STATUS
approved