Skip to main content
OlympiadHQ

Browse · MATH

Print

jmc

counting and probability senior

Problem

We call a number a mountain number if its middle digit is larger than any other digit. For example, 284 is a mountain number. How many 3-digit mountain numbers are there?
Solution
We will break this into three cases.

Case 1: numbers of the form ().

Any pair of nonzero digits has a corresponding palindrome () mountain number, so the number of these is .

Case 2: numbers of the form ().

Any group of three nonzero digits () has two corresponding mountain numbers ( and ), so the number of these is .

Case 3: numbers of the form ().

Any pair of nonzero digits has a corresponding mountain number in the form , so there are of these.

So the total number of mountain numbers is .
Final answer
240