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.

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.

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.

A367318 Lesser of twin primes p such that p and p+2 are both in A115591.

Original entry on oeis.org

191, 311, 1487, 1871, 2711, 2999, 3167, 3767, 4967, 5519, 7559, 8087, 10271, 11351, 11831, 13679, 15647, 18311, 18911, 21647, 22271, 22367, 23687, 25799, 26711, 27239, 27527, 27791, 29399, 29879, 31727, 31847, 33287, 34367, 35591, 38447, 38567, 40127, 40847, 42071
Offset: 1

Views

Author

Amiram Eldar, Nov 14 2023

Keywords

Comments

Primes p such that p+2 is also a prime and (p-1)/ord(2, p) = (p+1)/ord(2, p+2) = 2, where ord(2,k) is the multiplicative order of 2 modulo k.
Equivalently, lesser of twin primes p such that ord(2, p+2) = ord(2, p) + 1,
Equal consecutive values in A001917 that correspond to twin primes (p, p+2) are either 1 if p is in A319248, or 2 if p is in this sequence.
Terms are congruent to 23 modulo 24. - Jianing Song, Nov 01 2024

Crossrefs

Programs

  • Mathematica
    Select[Prime[Range[2, 4400]], PrimeQ[# + 2] && MultiplicativeOrder[2, # + 2] == MultiplicativeOrder[2, #] + 1 &]
  • PARI
    is(n) = isprime(n) && isprime(n+2) && znorder(Mod(2, n + 2)) == znorder(Mod(2, n)) + 1;
Showing 1-3 of 3 results.