<s>[INST] Find the number of pairwise coprime triples of positive integers (a,b,c) with aFind the number of pairwise coprime triples of positive integers $a,b,c$ with $a\lt b\lt c$ such that

                     a|bc−31, b|ca−31, c|ab−31  


Details and assumptions:
The notation n∣m means that $n$ is a divisor of $m$.
Clarification: $(ab−31)$,$(ac−31)$, and $(bc−31)$ may be zero or negative.
Any help will be appreciated.
Thanks
 [/INST] Hint: $a, b, c$ all divide $ab+ac+bc-31$, so since they are pairwise coprime, $$abc \mid (ab+ac+bc-31)$$
Continuation: Note that the above is equivalent to the given conditions.
Consider 3 cases, where $ab+ac+bc-31$ is $=0, <0, >0$.
Case 1: $ab+ac+bc-31=0$, then $31=ab+ac+bc \geq a(a+1)+a(a+2)+(a+1)(a+2)=3a^2+6a+2$, so $a \leq 2$.
If $a=1$, then $c>b>1$, and $(b+1)(c+1)=32$. We have $3 \leq b+1<\sqrt{32}$ so $b+1=4, c+1=8$ and $(a, b, c)=(1, 3, 7)$.
If $a=2$, then $c>b>2$ and $(b+2)(c+2)=35$. We have $5 \leq b+2<\sqrt{35}$ so $b+2=5, c+2=7$ and $(a, b, c)=(2, 3, 5)$.
Case 2: $ab+ac+bc-31<0$, then $abc \leq |ab+ac+bc-31|=31-ab-ac-bc$.
If $a \geq 2$, then $b \geq 3, c \geq 4$, so $31 \geq abc+ab+ac+bc \geq 2(3)(4)+2(3)+2(4)+3(4)>31$, a contradiction. 
Thus $a=1$, so $c>b>1$ and $2bc+b+c \leq 31$. 
If $b \geq 3$, then $c \geq 4$, so $31 \geq 2bc+b+c \geq 2(3)(4)+(3)+(4)=31$, so equality holds and we have $(a, b, c)=(1, 3, 4)$. Checking, this works.
Otherwise $b=2$, so $5c \leq 29$, giving $c=3, 4, 5$. However we also have $c \mid ab-31=-29$, so this gives no solution.
Case 3: $ab+ac+bc-31>0$, then $abc \leq ab+ac+bc-31$.
If $a \geq 3$, then $abc \geq 3bc \geq ab+ac+bc>ab+ac+bc-31 \geq abc$, a contradiction.
Thus $a=1, 2$. If $a=2$, then $c>b>2$ and $2bc \leq 2b+2c+bc-31$, so $bc+31 \leq 2b+2c$, so $(b-2)(c-2)+27 \leq 0$, a contradiction. 
Thus $a=1$, so $bc \leq b+c+bc-31$, so $b+c \geq 31$. Also $bc \mid (b+c+bc-31)$, so $bc \mid (b+c-31)$. If $b+c=31$, we have $(a, b, c)=(1, 2, 29), (1, 3, 28), \ldots, (1, 15, 16)$. Otherwise $bc \leq b+c-31$, so $(b-1)(c-1)+30 \leq 0$, a contradiction.
To conclude, the solutions are $(1, 3, 7), (2, 3, 5), (1, 3, 4), (1, 2, 29), (1, 3, 28), \ldots, (1, 15, 16)$.
</s>