Say we have the set $S=\{1, 2, 3, ..., 20\}$ and we define our relation (R) as
For every $x, y \in S$, $xRy$ iff for every prime $p, p | x \iff p | y$
This relation is an equivalence relation (as it is reflexive, symmetric and transitive) so I want to go ahead and find the equivalence classes for this relation.
So from my understanding, I'm looking for the ordered pairs in $S$ where $x$ and $y$ share a prime factor. With this in mind I believe one of the classes would be $\{5, 10, 15, 20\}$ as they all share the prime $5$ as a factor. I was wondering if there was some sort way to determine and list these equivalence classes without manually going through and listing all the ordered pairs?
Edit - I understand my initial understanding of the relation was incorrect and $\{5, 10, 15, 20\}$ isn't a valid equivalence class.