OFFSET
1,1
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
EXAMPLE
a(3)=2635 is a term because 2635=5*17*31 with (5*17) mod 31 = 23, (5*31) mod 17 = 2 and (17*31) mod 5 = 2 all prime.
MAPLE
N:= 10^5: # for terms <= N
P:= select(isprime, [seq(i, i=3..floor(sqrt(N)), 2)]):
R:= NULL:
for i from 1 to nops(P) do
p:= P[i];
for j from 1 to i-1 do
q:= P[j];
if 3*q*p > N then break fi;
for k from 1 to j-1 do
r:= P[k];
if r*q*p > N or r > p*q then break fi;
if isprime(p*q mod r) and isprime(p*r mod q) and isprime(q*r mod p) then
R:=R, p*q*r;
fi
od od od:
sort([R]);
MATHEMATICA
Block[{a = {}, nn = 42500}, Do[Do[Do[If[And[Length@ Union[{#1, #2, #3}] == 3, AllTrue[{Mod[#1 #2, #3], Mod[#1 #3, #2], Mod[#2 #3, #1]}, PrimeQ]], AppendTo[a, #1 #2 #3]] & @@ {Prime[i], Prime[j], Prime[k]}, {k, j - 1}], {j, i - 1}], {i, PrimePi@ Floor[Sqrt[nn]]}]; TakeWhile[Union@ a, # <= nn &]] (* Michael De Vlieger, Nov 05 2020 *)
Select[Union[Times@@@Select[Subsets[Prime[Range[50]], {3}], AllTrue[{ Mod[ #[[1]]#[[2]], #[[3]]], Mod[#[[2]]#[[3]], #[[1]]], Mod[#[[1]]#[[3]], #[[2]]]}, PrimeQ]&]], #<=50000&] (* Harvey P. Dale, Aug 11 2021 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
J. M. Bergot and Robert Israel, Nov 05 2020
STATUS
approved