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.

Showing 1-2 of 2 results.

A319248 Lesser of the pairs of twin primes in A001122.

Original entry on oeis.org

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

Views

Author

Jianing Song, Sep 15 2018

Keywords

Comments

Primes p such that both p and p + 2 are both in A001122.
Apart from the first term, all terms are congruent to 11 mod 24, since terms in A001359 are congruent to 5 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.

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.
		

Crossrefs

A319249 gives p+2, A319250 gives (p-11)/24.

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

Formula

a(n) = A319249(n) - 2.
For n >= 2, a(n) = 24*A319250(n-1) + 11.

A319250 Numbers k such that 24k + 11 and 24k + 13 are a pair of twin primes in A001122.

Original entry on oeis.org

0, 2, 7, 14, 17, 27, 34, 60, 67, 69, 84, 94, 144, 160, 167, 170, 177, 199, 282, 284, 289, 314, 342, 345, 367, 392, 419, 420, 422, 437, 452, 510, 525, 580, 599, 609, 619, 669, 674, 707, 724, 739, 797, 854, 865, 875, 895, 899, 900, 942, 952, 959, 984, 1004, 1080
Offset: 1

Views

Author

Jianing Song, Sep 15 2018

Keywords

Comments

Numbers k such that 24k + 11 and 24k + 13 are both in A001122. See A319248 and A319249 for detailed information.

Examples

			11 and 13 are a pair of twin primes both having 2 as a primitive root, so 0 is a term.
59 and 61 are a pair of twin primes both having 2 as a primitive root, so 2 is a term.
Although 227 and 229 are a pair of twin primes, neither of them has 2 as a primitive root, so 9 is not a term.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[0, 1080], PrimeQ[24*# + 11] && PrimeQ[24*# + 13] && PrimitiveRoot[24*# + 11] == 2 && PrimitiveRoot[24*# + 13] == 2 &] (* Amiram Eldar, May 02 2023 *)
  • PARI
    for(k=0, 1000, if(znorder(Mod(2,24*k+11))==24*k+10 && znorder(Mod(2,24*k+13))==24*k+12, print1(k, ", ")))

Formula

a(n) = (A319248(n+1) - 11)/24 = (A319249(n+1) - 13)/24.
Showing 1-2 of 2 results.