Maths Olympiad Prep

Library / /9 of 10

Number theory Difficulty 7.0 National olympiad Prove it Netherlands

We call a positive integer *sunny* if it has four digits and if moreover each of the two digits on the outside is exactly 1 larger than the digit next to it. The numbers 87238723 and 10011001 for example are sunny, but 12341234 and 8724587245 are not.

a) How many sunny numbers are there such that twice the number is again a sunny number?

b) Prove that every sunny number greater than 20002000 is divisible by a three-digit number with a 99 in the middle.

Solution

a. First we look at the last two digits of a sunny number. There are nine possibilities for these: 0101, 1212, 2323, 3434, 4545, 5656, 6767, 7878, and 8989. If we then look at twice a sunny number, we get the following nine possibilities, respectively, for the last two digits: 0202, 2424, 4646, 6868, 9090, 1212, 3434, 5656, and 7878. We see that twice a number can only be sunny if the original sunny number ends in 5656, 6767, 7878, or 8989. In all four cases we see that by doubling a 11 carries over to the hundreds.

Now we look at the first two digits of a sunny number. The nine possibilities are 1010, 2121, 3232, 4343, 5454, 6565, 7676, 8787, and 9898. If the first digit is 55 or higher, twice the number has more than four digits so it can never be sunny. The possibilities 1010, 2121, 3232, and 4343 are left. After doubling and adding the carried over 11 to the hundreds we get, respectively, 2121, 4343, 6565, and 8787. In all cases twice a sunny number is a sunny number if the first digits of the original sunny number are 1010, 2121, 3232, or 4343 and the last two digits are 5656, 6767, 7878, or 8989. In total there are 44=164 \cdot 4 = 16 combinations to be made, hence 1616 sunny numbers for which twice the number is again sunny. \square

b. Denote by aa and bb the two middle digits of a sunny number. Then the two digits on the outside are a+1a+1 and b+1b+1, so the number is 1000(a+1)+100a+10b+(b+1)=1100a+11b+10011000(a+1)+100a+10b+(b+1) = 1100a+11b+1001. This number is divisible by 1111 because 100a100a as well as 11b11b as well as 1001=91111001 = 91 \cdot 11 is divisible by 1111. After division by 1111 we get the number 100a+b+91100a+b+91. Now bb is at most 88, because b+1b+1 has to be a digit as well. Furthermore aa is at least 11, because the number we started with has to be at least 20002000. So we see that 100a+b+91=100a+109+(b+1)100a + b + 91 = 100a + 10 \cdot 9 + (b+1) is the three-digit number with digits aa, 99, and b+1b+1, a three-digit number with a 99 in the middle. \square

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: MathNet, licensed CC-BY-4.0. Statement and solution reproduced as published; topic and difficulty added by this site.