Maths Olympiad Prep

Library / /19 of 27

, 2026

Number theory Difficulty 4.1 AIME Prove it Canada

A peak number is a 5-digit positive integer, ABCBAABCBA, with digits 0<A<B<C<100< A < B < C<10. For example,
2787227\,872 is a peak number with A=2A=2, B=7B=7 and C=8C=8, but 5262552\,625 and 4695446\,954 are not peak numbers.

What is the positive difference between
the largest and smallest peak numbers?
How many peak numbers are greater than
3624536\,245 and less than
45 932?
Determine all peak numbers that are a
multiple of 1515.

Solution

Since $0 < A < B < C <
10, the largest possible value of Ais is 7,andwhen, and when A=7,wemusthave, we must have B=8and and C=9$.

Therefore the largest possible peak number is 7898778\, 987.

Similarly, the smallest possible peak number is 1232112\, 321.

Therefore the positive difference is $78\,
987-12\,321 = 66\, 666$.
Since $36\,245 < ABCBA <
45\,932,wehave, we have A=4$ or
A=3A=3.

If A=4A=4, then the first inequality
is true for all possible values of BB and CC, so we only need to consider 4BCB4<459324BCB4 < 45\,932. We must then have
B=5B=5, and then CC can be any of 66, 77, or 88, so there are 33 peak numbers when A=4A=4. (They are 4565445\, 654, $45
\, 754,, 45 \, 854$.)

If A=3A=3, then the second inequality
is true for all possible values of BB and CC, so we only need to consider 36245<3BCB336\,245 < 3BCB3. Then BB can be 66, in which case 7C97 \leq C \leq 9, or B=7B = 7, in which case 8C98 \leq C \leq 9, or B=8B=8, in which case we have that C=9C=9. Altogether, there are 66 peak numbers when A=3A=3. (They are 3676336\,763, 3686336\,863, 3696336\,963, 3787337\,873, 3797337\,973, 3898338\,983.)

Putting both cases together, there are a total of 3+6=93+6 = 9 peak numbers satisfying the
desired inequalities.
A number is a multiple of 1515
exactly when it is a multiple of both 55 and 33, and a number is a multiple of 55 exactly when it has units digit 00 or 55. Since 0<A<100<A<10 and ABCBAABCBA is a multiple of 1515, we must have A=5A=5.

Furthermore, 5BCB55BCB5 is a multiple of
1515 exactly when 5BCB55BCB5 is a multiple of 33.

A positive integer is a multiple of 33 exactly when the sum of its digits is a
multiple of 33. That is, 5BCB55BCB5 is a multiple of 33 exactly when 10+2B+C10 + 2B + C is a multiple of 33.

Since A=5A=5 and A<B<CA<B<C, the possible values of BB are 66, 77
and 88.

When B=6B=6, 10+12+C10+12+C is a multiple of 33 precisely when C=8C=8 (among the possible values 77, 88, 99 of CC).

When B=7B=7, 10+14+C10+14+C is a multiple of 33 precisely when C=9C=9.

Finally, when B=8B=8, the only
possible value of CC is 9, and 10+16+910+16+9 is not a multiple of 33.

Therefore, the peak numbers that are a multiple of 1515 are 5686556\,865 and 5797557\,975.

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

Source: CEMC, University of Waterloo, licensed CC-BY-NC-4.0. Statement reproduced verbatim; metadata (topic, difficulty) added by this project.