OFFSET
0,1
EXAMPLE
a(3) = 19 because there are 3 pairs (3,2), (7,2), (11,3) with
3 | 2+19, 2 | 3+19, 7 | 2+19, 2 | 7+19, 11 | 3+19, 3 | 11+19.
MAPLE
M:= 10000: N:= ithprime(M): B:= Vector(N):
a:= 1:
do
a:= nextprime(a);
if a >= N then break fi;
b:= a;
do
b:= nextprime(b);
if b >= N then break fi;
c0:= chrem([-a, -b], [b, a]);
cs:= select(isprime, [seq(c0+i*a*b, i=ceil((b+2-c0)/(a*b)) .. floor((N-c0)/(a*b)))]);
B[cs]:= B[cs]+~1;
od:
od:
V:= Array(0..14):
for i from 2 to N do
v:= A[i];
if V[v] = 0 then V[v]:= i fi
od:
convert(V, list);
PROG
(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
a(n) = forprime(p=1, , if(count_pairs(p)==n, return(p))) \\ Felix Fröhlich, May 28 2021
CROSSREFS
KEYWORD
nonn,more
AUTHOR
J. M. Bergot and Robert Israel, May 28 2021
EXTENSIONS
a(15)-a(17) from Chai Wah Wu, Jun 04 2021
a(18) from Bert Dobbelaere, Jun 07 2021
a(19)-a(21) from Chai Wah Wu, Jun 04 2021
a(22)-a(29) from Bert Dobbelaere, Jun 07 2021
STATUS
approved