A319249 Greater of the pairs of twin primes in A001122.
5, 13, 61, 181, 349, 421, 661, 829, 1453, 1621, 1669, 2029, 2269, 3469, 3853, 4021, 4093, 4261, 4789, 6781, 6829, 6949, 7549, 8221, 8293, 8821, 9421, 10069, 10093, 10141, 10501, 10861, 12253, 12613, 13933, 14389, 14629, 14869, 16069, 16189, 16981, 17389, 17749
Offset: 1
Keywords
Examples
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.
Links
- Amiram Eldar, Table of n, a(n) for n = 1..10000 (terms 1..406 from Jianing Song)
Programs
-
Mathematica
Select[Prime[Range[2^11]], PrimeQ[# - 2] && PrimitiveRoot[# - 2] == 2 && PrimitiveRoot[#] == 2 &] (* Amiram Eldar, May 02 2023 *)
-
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 A319249_list = list(islice(A319249_gen(),30)) # Chai Wah Wu, Feb 13 2023
Comments