The number of three digit numbers of the form $xyz$ such that $x<y$ and $z\leq y$

permutations

The number of three digit numbers of the form $xyz$ such that $x<y$ and $z \leq y$.

Over here, $y$ is the greatest digit. The minimum value of $y$ will be $2$ to form a three-digit number. As $x$ can't be $0$, Let us now assume that $y=n$, where $n \in \{2, 3, 4, 5, 6, 7, 8, 9\}$.

For $y=n$, $z$ can take values ranging from $0$ to $n$. $x$ i.e., a total of $n+1$ values. $x$ will take a value from $1$ to $n-1$, i.e., a total of $n-1$ values.

Therefore, for $y=n$ we will have $(n-1)\times (n+1)$ possible numbers. Total number of three-digit numbers that can be formed are

$$\sum_{n=2}^9 n^2-1 = 273$$

However the answer is given as $276$

Best Answer

Observe that $$\begin{align} \sum\limits_{n=2}^{9} (n^2 - 1) & = \left (\sum\limits_{n=1}^{9} n^2 \right ) - 9. \\ & = \frac {9(9+1)(2 \times 9 + 1)} {6} - 9. \\ & = \frac {9 \times 10 \times 19} {6} - 9.\\ & = 285 - 9. \\ & = 276. \end{align}$$