Given a finite set of primes S and an m-tuple $$(a_1,\ldots ,a_m)$$
(
a
1
,
…
,
a
m
)
of positive, distinct integers we call the m-tuple S-Diophantine, if for each $$1\le i < j\le m$$
1
≤
i
<
j
≤
m
the quantity $$a_ia_j+1$$
a
i
a
j
+
1
has prime divisors coming only from the set S. For a given set S we give a practical algorithm to find all S-Diophantine quadruples, provided that $$|S|=3$$
|
S
|
=
3
.