let A be the set of numbers divided by 2,
B be the set of numbers divide by 3 and
C be the set of numbers divide by 7
A = {2,4,6,8 .......42 }
B = {3,6,9,....42 }
C = {7,14,21,28,35,42}
|A| = 21 , |B| = 14 , |C| = 6
By principle of inclusion and exclusion,
|A $\cup$ B $\cup$ C| = |A|+|B|+ |C| - |A$\cap$B| - |B$\cap$C| - |A$\cap$C| + |A$\cap$B $\cap$ C|
A$\cap$B = {6,12...42}
|A$\cap$B| = 7
B$\cap$C = {21,42}
|B$\cap$C| = 2
A$\cap$C = {14,28,42}
|A$\cap$C | = 3
A∩B∩C = {42}
|A∩B∩C| = 1
|A $\cup$ B $\cup$ C| = 21 + 14 + 6 - 7 - 2 - 3 + 1
|A $\cup$ B $\cup$ C| = 30