Decompose binary into alternating subsequences This was inspired by Problem 13 - Non-Repeating Binary of HP CodeWars' recent competition.

Let's take a random decimal number, say

727429805944311


and look at its binary representation:

10100101011001011111110011001011101010110111110111


Now split that binary representation into subsequences where the digits 0 and 1 alternate.

1010 010101 10 0101 1 1 1 1 1 10 01 10 0101 1 1010101 101 1 1 1 101 1 1


And convert each subsequence back into decimal.

10 21 2 5 1 1 1 1 1 2 1 2 5 1 85 5 1 1 1 5 1 1


The Task

Take a single, positive integer as input and output the sequence of positive integers obtained by the above process.

Details


Input and output must be in decimal or unary.
Numbers in the output must be separated in a sensible, human-readable fashion, and they must be in decimal or unary. No restriction on white space. Valid output styles: [1,2,3], 1 2 3, 1\n2\n3 where \n are literal newlines, etc.


Test cases

 Input | Output
     0 | 0
     1 | 1
     2 | 2
     3 | 1 1
     4 | 2 0
     5 | 5
     6 | 1 2
     7 | 1 1 1
     8 | 2 0 0
     9 | 2 1
    10 | 10
    50 | 1 2 2
   100 | 1 2 2 0
  1000 | 1 1 1 1 10 0 0
 10000 | 2 1 1 2 0 2 0 0 0
 12914 | 1 2 2 1 1 2 2
371017 | 5 42 10 2 1


Additional note: all numbers in the output should be of the form (2^k-1)/3 or 2*(2^k-1)/3. That is, 0 1 2 5 10 21, 42, 85, 170, ..., which is A000975 in the OEIS.
Pyth, 17 16 bytes

1 byte thanks to Jakube

iR2cJ.BQx1qVJ+dJ


Demonstration

A nice, clever solution. Uses some lesser known features of Pyth, like x&lt;int&gt;&lt;list&gt; and c&lt;str&gt;&lt;list&gt;.

iR2cJ.BQx1qVJ+dJ
                    Q = eval(input())
    J.BQ            Store in J the input in binary.
          qV        Vectorize equality function over
            J+dJ    J and J with a leading dummy char, to get the offset right.
                    This calculates whether each element matches its successor.
        x1          Find all of the indexes of 1 (True) in this list.
   cJ                Chop J at those locations.
iR2                  Convert from binary back to base ten and output.