[Math] Math Olympiad problem

contest-math

A year is peculiar if the sum of the first two digits and the last two digits is equal to the middle two digits. For example, 1978. When was the last peculiar year and is there an algorithm to find any peculiar year?

How would I go about solving this problem? I am completely lost. Any ideas would help.

Best Answer

There is no peculiar year in the 21st century, since the middle two digits form a 1 digit number.

In the 20th century, any year is of the form $19xy$. Then the year is peculiar if and only if

$$19+xy=9x \Leftrightarrow 19+10x+y=90+x \Leftrightarrow 9x+y=71 \,.$$

Then since $0 \leq y \leq 9$ we get

$$9x \leq 71 \leq 9x+9 \Rightarrow 62 \leq 9x \leq 71 \Rightarrow x=7 \,.$$

Plugging $x=7$ in $9x+y=71$ we get that $y=8$.

Thus, the only peculiar year in 20's century is 1978.

If the question asks for the peculiar year before 1978, it must be in the 19th century or before:

Repeating:

In the 19th century, any year is of the form $18xy$. Then the year is peculiar if and only if

$$18+xy=8x \Leftrightarrow 18+10x+y=80+x \Leftrightarrow 9x+y=62 \,.$$

Then

$$9x \leq 62 \leq 9x+9 \Rightarrow 53 \leq 9x \leq 62 \Rightarrow x=6 \,.$$

Plugging $x=6$ in $9x+y=62$ we get that $y=8$.

Thus in the 19th century the only peculiar year is $1868$.

P.S. Any peculiar year of the form $1abc$ satisfies

$$10+a+10b+c=10a+b \Rightarrow 9a-9b-c=10$$

This implies that $c \equiv -1 \pmod{9}$ thus $c=8$ and then

$$a-b=2 \,.$$

From here you get easily all the peculiar years between $1000$ and $1999$.

P.P.S. If you are looking for all $4$ digits answers $abcd$ then you need to solve

$$10a+b+10c+d=10b+c \Rightarrow 10a+d= 9(b-c) \,.$$

Then

$$a+d \equiv 0 \pmod 9 \,,$$ and any pair $(a,d)$ which satisfies this relation uniquely determine $b-c$.

So fixing $a$ you get the value(s) of $d$ and from here $b-c$.

Related Question