Why Room 11 is inaccessible

The key is noticing that, since each move changes exactly one binary digit, the total number of 1's in the binary representation of the room number must change by +1 on every step. Thus, the number of 1's in the binary number must alternate from odd to even as we wander through the maze. For example, the first 5 steps (which are in fact forced) are:
2=102 -> 3 = 112 -> 7 = 1112 -> 5 = 1012 -> 13 = 11012 -> 29 = 111012.
Notice that 2, 7, and 13 all have an odd number of 1's, while 3, 5, and 13 have an even number of 1's.

What does this tell us about Room 11? Since 11 = 10112 has an odd number of 1's, it must be reached in an even number of steps, as 7 and 13 do. Yet 7 and 13 have a property that 11 doesn't.

Consider what happens when we divide each of the room numbers by 3. Besides Room 3, the remainder must be 1 or 2, since the room number is always prime. Since we are always adding or subtracting a power of 2 at each stage, (which of course is not divisible by 3), the remainder must also change on each move we make. This remainder is sometimes referred to as the modulo of the number. Hence, except for rooms 2 and 3, the modulo of the room numbers must alternate from 1 to 2 as we go through the maze.

It now becomes clear why 11 can't be reached. Notice that 7 and 13 are both one more than a multiple of 3, while 11 is 2 more than a multiple of 3. We see that after an even number of steps, the room number will always be one more that a multiple of 3, so 11 can never be reached.

The principle outlined here is called parity, an important tool both in mathematics and physics. We can consider the primes having an odd number of 1's and a modulo of 1, along with the primes with an even number of 1's and a modulo of 2, to be primes having the correct parity. All other primes, with the exception of 2 and 3, are considered to have incorrect parity. The first few primes with incorrect parity are 11, 41, 43, 47, 59, and 107.

Does this mean that all of the Rooms with the correct parity can be reached? No. Room 683 is the smallest prime of the correct parity with no known access. The current conjecture is that there is in fact no way to get from 2 to 683. For a prime with the correct parity and a proof that it can't be reached, see here.

Back to the maze.