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-3 of 3 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.

A319249 Greater of the pairs of twin primes in A001122.

Original entry on oeis.org

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

Views

Author

Jianing Song, Sep 15 2018

Keywords

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.

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.
		

Crossrefs

A319248 gives p-2, A319250 gives (p-13)/24.

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

Formula

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

A377561 Numbers k such that 24k - 1 and 24k + 1 are a pair of twin primes in A115591.

Original entry on oeis.org

8, 13, 62, 78, 113, 125, 132, 157, 207, 230, 315, 337, 428, 473, 493, 570, 652, 763, 788, 902, 928, 932, 987, 1075, 1113, 1135, 1147, 1158, 1225, 1245, 1322, 1327, 1387, 1432, 1483, 1602, 1607, 1672, 1702, 1753, 1767, 1845, 1880, 1973, 1992, 2083, 2155, 2212, 2220, 2233
Offset: 1

Views

Author

Jianing Song, Nov 01 2024

Keywords

Comments

Numbers k such that 24k - 1 is in A367318. Note that all terms there are congruent to 23 modulo 24.

Examples

			8 is a term since the multiplicative order of 2 modulo 24*8 - 1 = 191 is 95, and the multiplicative order of 2 modulo 24*8 + 1 = 193 is 96.
		

Crossrefs

Programs

  • PARI
    isA377561(k) = znorder(Mod(2, 24*k-1))==12*k-1 && znorder(Mod(2, 24*k+1))==12*k \\ No need to check primality as the multiplicative order of 2 modulo a composite odd number m cannot be equal to (m-1)/2; see my comment in A001567

Formula

a(n) = (A367318(n) + 1)/24.
Showing 1-3 of 3 results.