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.
%I A319249 #33 May 02 2023 02:28:22 %S A319249 5,13,61,181,349,421,661,829,1453,1621,1669,2029,2269,3469,3853,4021, %T A319249 4093,4261,4789,6781,6829,6949,7549,8221,8293,8821,9421,10069,10093, %U A319249 10141,10501,10861,12253,12613,13933,14389,14629,14869,16069,16189,16981,17389,17749 %N A319249 Greater of the pairs of twin primes in A001122. %C A319249 Primes p such that both p - 2 and p are both in A001122. %C A319249 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. %C A319249 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. %C A319249 Also note that a pair of cousin primes can't both appear in A001122, while a pair of sexy primes can. %H A319249 Amiram Eldar, <a href="/A319249/b319249.txt">Table of n, a(n) for n = 1..10000</a> (terms 1..406 from Jianing Song) %F A319249 a(n) = A319248(n) + 2. %F A319249 For n >= 2, a(n) = 24*A319250(n-1) + 13. %e A319249 11 and 13 is a pair of twin primes both having 2 as a primitive root, so 13 is a term. %e A319249 59 and 61 is a pair of twin primes both having 2 as a primitive root, so 61 is a term. %e A319249 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. %t A319249 Select[Prime[Range[2^11]], PrimeQ[# - 2] && PrimitiveRoot[# - 2] == 2 && PrimitiveRoot[#] == 2 &] (* _Amiram Eldar_, May 02 2023 *) %o A319249 (PARI) forprime(p=3, 10000, if(znorder(Mod(2,p))==p-1 && znorder(Mod(2,p+2))==p+1, print1(p+2, ", "))) %o A319249 (Python) %o A319249 from itertools import islice %o A319249 from sympy import isprime, nextprime, is_primitive_root %o A319249 def A319249_gen(): # generator of terms %o A319249 p = 2 %o A319249 while (p:=nextprime(p)): %o A319249 if isprime(p+2) and is_primitive_root(2,p) and is_primitive_root(2,p+2): %o A319249 yield p+2 %o A319249 A319249_list = list(islice(A319249_gen(),30)) # _Chai Wah Wu_, Feb 13 2023 %Y A319249 Cf. A001122, A001359, A006512. %Y A319249 A319248 gives p-2, A319250 gives (p-13)/24. %K A319249 nonn %O A319249 1,1 %A A319249 _Jianing Song_, Sep 15 2018