Let A be a set of n ( 3) distinct elements. The number of triplets (x, y, z) of the A elements in which at least two coordinates is equal to
Total number of triplets without restriction is .
The number of triplets with all different coordinates is nP3.
Therefore, the required number of triplets is .