If we are given a diophantine equation of the form a+b+c = 30 (say) and we need to find the number of positive integer solutions, we can say that the answer would be $29\choose2$.
If we were to find out the number of solutions in which a.b.c were coprime to each other or GCD(a,b,c)=1 . How do you proceed?
I mean one can proceed to find solutions in which any two are equal say {14,14,2} or {1,1,28} and say there are 14 such selections or 3 times 14 solutions. Or we can start with saying that, among the $29\choose2$ solutions such that gcd(a,b,c)=2 are included so we subtract those which come out to be solutions of a1+b1+c1=15. But here as well some solutions will have to be discarded.
This is something I came up randomly, is there an ordered( nice) way of doing this math since I might miss a lot of cases.
Thanks
$\gcd(a,b,c)$ is one of the numbers $1,2,3,5,6,10,15,30$ and you can handle each of these possibilities the same way you handled $\gcd(a,b,c)=2$, namely, divide through by the gcd and find the number of solutions of $a+b+c=30/d$. You'll have to apply the Principal of Inclusion-Exclusion so that you don't do any double-counting.