Given an inequation with P,Q,R all integers, $P \cdot R \cdot b + P \cdot Q \cdot c - Q \cdot R \cdot a \geq 0$
how many positive integer solutions of $(a, b, c)$ ? Here $a \leq P, b \leq Q, c \leq R$.
I cannot see any effective method except brute force in which three layers of loops are used to test each $(a,b,c)$. Any better method to solve this problem?
Well, to begin, let's note that we can count the number of solutions using only two layers of loops instead of three layers of loops (i.e., we can compute the answer in time $O(QR)$ instead of $O(PQR)$). To do this, note that we can rearrange the inequality as follows:
$$a \leq \dfrac{P}{QR}(Rb+Qc)$$
It follows that the number of solutions $N$ to this inequality (that also satisfy $a \leq P$, $b\leq Q$, and $c\leq R$) is just:
$$N= \sum_{b=1}^{Q}\sum_{c=1}^{R} \min\left(\left\lfloor\dfrac{P}{QR}(Rb+Qc)\right\rfloor, P\right)$$
Of course, this solution is a bit unsatisfactory, since what we'd really like is a (relatively) closed form for $N$ in terms of $P$, $Q$, and $R$. I was unfortunately unable to find such a closed form. However, it should be noted that this problem is essentially the problem of counting the number of lattice points in a convex polyhedron (namely the polyhedron defined by the inequalities), and there is a huge body of literature devoted to this problem. See for example, this survey.
Here's one simple thing you can prove using these methods, for example. Let $N(P,Q,R)$ be the number of solutions as a function of $P$, $Q$, and $R$. Fix positive integers $\alpha$, $\beta$, and $\gamma$. Then $N(\alpha n, \beta n, \gamma n)$ is a quasi-polynomial in $n$.