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-1 of 1 results.

A338567 Primes p such that (q*r) mod p is prime, where q and r are the next primes after p.

Original entry on oeis.org

3, 5, 7, 13, 19, 23, 31, 89, 199
Offset: 1

Views

Author

J. M. Bergot and Robert Israel, Nov 02 2020

Keywords

Comments

a(10) > 2*10^10 if it exists. - Michael S. Branicky, Mar 05 2021
From Jason Yuen, Jun 11 2024: (Start)
All terms satisfy (q-p)*(r-p) > p.
Data from A002386 and A005250 show that a(10) > 18361375334787046697 if it exists. (End)
Note that q*r == (q-p)*(r-p) (mod p). As soon as the prime gap grows slow enough, for all large enough p we have (q*r) mod p = (q-p)*(r-p), which is composite, implying finiteness of this sequence. In particular, finiteness would follow from Cramer's conjecture. - Max Alekseyev, Nov 09 2024

Examples

			a(4)=13 is in the sequence because it is prime, the next two primes are 17 and 19, and (17*19) mod 13 = 11, which is prime.
		

Crossrefs

Cf. A338566, A338570. Contained in A338577.

Programs

  • Maple
    R:= NULL: q:= 2: r:= 3:
    count:= 0:
    for i from 1 to 10000 do
      p:= q; q:= r; r:= nextprime(r);
      if isprime(q*r mod p) then count:= count+1; R:= R, p fi
    od:
    R;
  • Python
    from sympy import nextprime, isprime
    def afind(limit):
      p, q, r = 1, 2, 3
      while p < limit:
        p, q, r = q, r, nextprime(r)
        if isprime(q*r % p): print(p, end=", ")
    afind(200) # Michael S. Branicky, Mar 05 2021
Showing 1-1 of 1 results.