Can You Switch A Digit?

Riddler Express

From Ben Weiss and David Butler comes a what is presumably Eleven’s favorite puzzle to think about in her sensory deprivation tank:

Anna loves multiples of 11, but her friend Jane is not quite so keen. One day, Anna is flipping idly through the yellow pages (remember those?), which is full of 10-digit numbers. She notices that every 10-digit number seems to have an interesting property: It is either a multiple of 11, or it can be made a multiple of 11 by changing a single digit. For example, there are several ways to make the 10-digit number 5551234567 into a multiple of 11, such as changing the first digit to 4.

This gets the two friends wondering: Does every counting number have this property? Either prove it’s true for every number, or find the smallest counting number that is not a multiple of 11 and cannot be made a multiple of 11 by changing one digit.

Solution

I started with smaller numbers and worked my way up.

Two Digit

Every two digit number TU is divisible by 11 if T = U, where T and U are the tens and units digits, respectively. Changing T to U or U to T will affirm Anna's property for any two digit number.

Three Digit

Lets define an immutable number as a three digit number that can have either its tens or units digit changed to any other, but not be divisible by 11.

The immutable numbers are summarized in the following table.

Range Immutable Number
$100 - 199$ $109$
$200 - 299$ $218$
$300 - 399$ $327$
$400 - 499$ $436$
$500 - 599$ $545$
$600 - 699$ $654$
$700 - 799$ $763$
$800 - 899$ $872$
$900 - 999$ $981$

I determined these numbers graphically. Multiples of 11 are in teal, the immutable number is shown in purple.

However, changing the hundreds digit can yield a multiple of eleven...

Range Immutable Number Change Hundreds Digit
$100 - 199$ $109$ $209$
$200 - 299$ $218$ $418$
$300 - 399$ $327$ $627$
$400 - 499$ $436$ $836$
$500 - 599$ $545$ ???
$600 - 699$ $654$ $154$
$700 - 799$ $763$ $363$
$800 - 899$ $872$ $572$
$900 - 999$ $981$ $781$

Answer

Except for 545. Anna's property is not correct, and 545 is the first counterexample.

Rohan Lewis

2022.06.20

Code can be found here.