Maths Olympiad Prep

Library / /143 of 520

Combinatorics Difficulty 4.9 AIME Find the answer

4. If a number, from the highest digit to the lowest digit, does not decrease at each digit, it is called a "positive number" (such as 1212, 2222, 566566, 14481448, 123456789123456789, etc.); if a number, from the highest digit to the lowest digit, does not increase at each digit, it is called a "negative number" (such as 2121, 2222, 665665, 84418441, etc.). A number that is neither a positive number nor a negative number is called a "swinging number" (such as 253253, 34733473, 58875887, etc.). Then among the three-digit numbers, there are \qquad swinging numbers.

A number or a short expression. Spacing and $ signs are ignored.

Solution

4.525.

According to the definition of a wavy number, we discuss in two cases:
(1) The hundreds, tens, and units digits are in the pattern "small-large-small": there are
2×1+3×2++9×8=240 (numbers).  2 \times 1+3 \times 2+\cdots+9 \times 8=240 \text { (numbers). }
(2) The hundreds, tens, and units digits are in the pattern "large-small-large": there are
12+22++92=285 (numbers).  1^{2}+2^{2}+\cdots+9^{2}=285 \text { (numbers). }

In summary, there are 240+285=525240+285=525 wavy numbers.

Want a route through all this instead of an archive? The track puts 2,000 problems in a working order, from AMC 10 level to the IMO shortlist.

Source: NuminaMath-1.5, licensed Apache-2.0. Statement and solution reproduced as published; topic and difficulty added by this site.