number of ways of choosing triplet $(x, y, z)$ such that $z > \max\{x, y\}$ and $x, y, z\in \{1, 2,\dots, n + 1\}$ ?
It is $n^2+(n-1)^2... 1^2$.
Now i want to prove that it is same as $\binom{n+1}{2}+2\binom{n+1}{3}$ combinatorially
My try:Select any three numbers from the set, now it is obvious that one of them will be greatest so it will be assigned as z. for x and y we have two choices so ways =$2\binom{n+1}{3}$ but how do I get $\binom{n+1}{2}$ ?