%I #16 Jun 07 2021 18:51:01
%S 2,11,7,19,103,163,263,719,3119,3779,6719,18719,7559,67679,52919,
%T 181439,138599,241919,818999,262079,453599,665279,1542239,1713599,
%U 1330559,4979519,2741759,5569199,7197119,5745599
%N a(n) is the least prime p such that there are exactly n pairs of primes (q,r) with p > q > r such that q | r + p and r | q + p.
%e a(3) = 19 because there are 3 pairs (3,2), (7,2), (11,3) with
%e 3 | 2+19, 2 | 3+19, 7 | 2+19, 2 | 7+19, 11 | 3+19, 3 | 11+19.
%p M:= 10000: N:= ithprime(M): B:= Vector(N):
%p a:= 1:
%p do
%p a:= nextprime(a);
%p if a >= N then break fi;
%p b:= a;
%p do
%p b:= nextprime(b);
%p if b >= N then break fi;
%p c0:= chrem([-a,-b],[b,a]);
%p cs:= select(isprime, [seq(c0+i*a*b,i=ceil((b+2-c0)/(a*b)) .. floor((N-c0)/(a*b)))]);
%p B[cs]:= B[cs]+~1;
%p od:
%p od:
%p V:= Array(0..14):
%p for i from 2 to N do
%p v:= A[i];
%p if V[v] = 0 then V[v]:= i fi
%p od:
%p convert(V,list);
%o (PARI) count_pairs(n) = my(i=0); forprime(q=1, n-1, forprime(r=1, q-1, if((r+n)%q==0 && (q+n)%r==0, i++))); i
%o a(n) = forprime(p=1, , if(count_pairs(p)==n, return(p))) \\ _Felix Fröhlich_, May 28 2021
%Y Cf. A344788.
%K nonn,more
%O 0,1
%A _J. M. Bergot_ and _Robert Israel_, May 28 2021
%E a(15)-a(17) from _Chai Wah Wu_, Jun 04 2021
%E a(18) from _Bert Dobbelaere_, Jun 07 2021
%E a(19)-a(21) from _Chai Wah Wu_, Jun 04 2021
%E a(22)-a(29) from _Bert Dobbelaere_, Jun 07 2021