This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
I'll not prove my statements, but I'll give the idea (I think everything can be proven directly without complicated methods, but it looks to be messy):
Starting with a binary representation, there are two types of changes that can happen (all of the following are numbers written in base 2, but we allow the digit 2 , so it's not properly binary):
Note that 2 0 1 7 in binary is 1 1 1 1 1 1 0 0 0 0 1 . Therefore we can either leave the representation unchanged or change it. If we decide to change it, then we must choose one of the four 0 s to become a 2 and we must choose one of the six consecutive 1 s to become a 0 . It follows that there are 4 ⋅ 6 = 2 4 ways to change the representation. Adding this to the unchanged representation gives an answer of 2 4 + 1 = 2 5 .