How accurate is this sequence of flips in predicting the next binary number?

39 Views Asked by At

I saw this video on how to teach binary number on Twitter: https://mobile.twitter.com/MichaelGalanin/status/1140072321006428160

and i noticed is that the binary correspondent to the N numbers change from 0 to 20 according to a flipping sequence from left to right.

(1,2,1,3,1,2,1,4,1,2,1,3,1,2,1,5,1,2,1,3....)

which seems to me that it go that way

1,2,1,3,1,2,1,4,1,2,1,3,1,2,1,5,1,2,1,3,1,2,1,6,1,2,1,3,1,2,1,7,1,2,1,3,1,2,1,2,1,8

here is the sequence of flips ordered in easier way for the weary eyes:

1213

1214

1213

1215

1213

.

.

.

.

my question is, is this sequence of flips proven true to all N binary Numbers? is it even true at all after 20?

1

There are 1 best solutions below

0
On

The number of flips would correspond to the number of zeros terminating the binary numbers. Essentially the number of flips corresponds to the cascading of 1's->0's.

This immediately implies that the number of flips must be the highest power of 2 that divides the number plus one.