Problem : Find number of co-primes pair (x,y,z) in a list of numbers.
My solution:
No of (even, odd, odd) + No of (even,even,odd) + No of (odd,odd,odd).
lets say N is number of even and M is no of odd.
(even, even, odd) = (N!/2!(N-2)!) * M
(even, odd, odd) = N*(M!/2!(M-2)!)
and for (odd,odd,odd) I dont know how to get because of following
( x belong to set M, y belong to set k(x), z belong to set (M-2) (excluding x and y))
(note: k(x) is a subset of M)
k(x) = list of numbers not divisible by x
How to find the number of combinations to pick 3 numbers.
Sorry I don't know how to use mathematical symbols in the question.
Thanks.