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.

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

This page as a plain text file.
%I A338566 #14 Nov 10 2024 09:25:18
%S A338566 5,11,19,29,43,47,283
%N A338566 Primes p such that (p*q) mod r is prime, where q and r are the next primes after p.
%C A338566 a(8) > 40000000 if it exists.
%C A338566 Note that p*q == (r-p)*(r-q) (mod r). As soon as the prime gap grows slow enough, for all large enough p we have (p*q) mod r = (r-p)*(r-q), which is composite, implying finiteness of this sequence. In particular, finiteness would follow from Cramer's conjecture. - _Max Alekseyev_, Nov 09 2024
%e A338566 a(3)=19 is in the sequence because it is prime, the next two primes are 23 and 29, and (19*23) mod 29 = 2, which is prime.
%p A338566 R:= NULL: q:= 2: r:= 3:
%p A338566 count:= 0:
%p A338566 for i from 1 to 10000 do
%p A338566   p:= q; q:= r; r:= nextprime(r);
%p A338566   if isprime(p*q mod r) then count:= count+1; R:= R, p fi
%p A338566 od:
%p A338566 R;
%Y A338566 Contained in A338578.
%Y A338566 Cf. A338567.
%K A338566 nonn,more
%O A338566 1,1
%A A338566 _J. M. Bergot_ and _Robert Israel_, Nov 02 2020