TITLE: How to find the probability of selecting two numbers from 1 to 8 with no common prime factor?
QUESTION [0 upvotes]: Can anyone help me this problem? The following is my understanding. The set of the integers is {1, 2, 3, 4, 5, 6, 7, 8, and 2, 3, 5, 7 are not common prime factor. My answer is not right.

Two different integers are randomly selected from the set of integers greater than 0 and less than 9. What is the probability that they have not common prime factor? Express your answer as a common fraction.

REPLY [1 votes]: You can use complementary counting. First find the pairs where the integers would have a common prime factor. The pairs are $(2,4)\;(2,6)\;(2,8)\;(3,6)\;(4,6)\;(4,8)\;(6,8)$. The total number of ways to choose two different integers from the set would be $\dfrac{8\times 7}2=28$ ways. So then $$1-\dfrac7{28}=\dfrac{21}{28}=\dfrac34$$
{"set_name": "stack_exchange", "score": 0, "question_id": 2166410}