A319248 Lesser of the pairs of twin primes in A001122.
3, 11, 59, 179, 347, 419, 659, 827, 1451, 1619, 1667, 2027, 2267, 3467, 3851, 4019, 4091, 4259, 4787, 6779, 6827, 6947, 7547, 8219, 8291, 8819, 9419, 10067, 10091, 10139, 10499, 10859, 12251, 12611, 13931, 14387, 14627, 14867, 16067, 16187, 16979, 17387, 17747
Offset: 1
Keywords
Examples
11 and 13 is a pair of twin primes both having 2 as a primitive root, so 11 is a term. 59 and 61 is a pair of twin primes both having 2 as a primitive root, so 59 is a term. Although 101 and 103 is a pair of twin primes, 101 has 2 as a primitive root while 103 doesn't, so 101 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 && PrimitiveRoot[# + 2] == 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, ", ")))
-
Python
from itertools import islice from sympy import isprime, nextprime, is_primitive_root def A319248_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 A319248_list = list(islice(A319248_gen(),30)) # Chai Wah Wu, Feb 13 2023
Comments