# A Property of Unimodal Integers as a Whole

### Problem

This is Problem 6 from the 2014 Leonard Euler Olympiad for Junior High students.

Call an integer *unimodal* or (*hill-like*) if there is a unique digit greater than all others and such that the preceding sequence of digits is nondecreasing whereas the digits following it form a nonincreasing sequence.

Let $S$ be the sum of all $100$-digit unimodal numbers. Prove that $S$ is composite.

### Solution

We'll prove more, namely that $S$ is divisible by $11.$

Let $N$ be one of the unimodal integers with $100$ digits. Define $N'$ as $N$ written in reverse. The two numbers are necessarily different because (due to the number of digits being even) their greatest digits could not occur at the same location (or correspond to the same index.) Moreover, the digits with odd indices in $N$ acquire even indices in $N',$ and vice versa. Recollect the criterion of divisibility by $11$. Let $e(n)$ be the sum of all the digits of integer $n$ with even indices, $o(n)$ the sum of all the digits of $n$ with odd indices. $n$ is divisible by $11$ only if $e(n)-o(n)=0.$

Now, it follows that $e(N)-o(N)=o(N')-e(N')$ which means that $N\equiv -N'\;\text{(mod}\; 11),$ or that

$N+N'\equiv 0\;\text{(mod}\; 11).$

Since all unimodal integers come in pairs - a number and its reverse - the sum $S$ of all $100$-digit unimodal numbers is divisible by $11.$

The essential point in the proof is that $N\ne N',$ which is true for all non-palindromic numbers. However, stating this requirement in the problem would practically give away the solution.

|Contact| |Front page| |Contents| |Arithmetic|

Copyright © 1996-2018 Alexander Bogomolny