Convert numbers to binary... but you're allowed to use twos as well Based on the &quot;binary, but with twos&quot; notation mentioned in this numberphile video, write a function that takes a single number as input and outputs all variations of that number in a &quot;binary&quot; system where twos are allowed.
Rules

Code must only be a function/method, not a full program
Input is an integer passed as the sole parameter to the function
Output is all valid variations of the input number converted to &quot;binary, but with twos&quot; notation
Output is the return value of the function, but can be in whatever format is convenient as long as it's obvious (eg, 3 ints, 3 strings, comma/space delimited string, array of ints, etc), order is unimportant
In the unlikely event that a language happens to contain a built-in function to achieve the result, it's disallowed
Shortest code in bytes is the winner

Explanation of the output
By example, if you're passed the number 9, you can convert it to binary as 1001, but if you allowed 2s in each position, you could also write it as 201 (i.e. 2*4 + 0*2 + 1*1), or 121 (i.e. 1*4 + 2*2 + 1*1), as shown in this table:
+----+----+----+----+
| 8s | 4s | 2s | 1s |
+----+----+----+----+
|  1 |  0 |  0 |  1 |
|  0 |  2 |  0 |  1 |
|  0 |  1 |  2 |  1 |
+----+----+----+----+

So, if passed 9, your function would need to return the three numbers, 1001, 201 and 121.
Format and order are irrelevant, so long as it's obvious (i.e. [121,201,1001], &quot;0201 0121 1001&quot;, (&quot;1001&quot;,&quot;121&quot;,&quot;201&quot;) are valid results when given an input of 9).
Examples

2 =&gt; 10, 2
9 =&gt; 1001, 201, 121
10 =&gt; 1010, 210, 202, 1002, 122
23 =&gt; 2111, 10111
37 =&gt; 100101, 20101, 100021, 20021, 12101, 12021, 11221
GolfScript (25 bytes) / CJam (19 17 bytes)

GolfScript:

{:^.*,{3base}%{2base^=},}


This creates an anonymous function (see meta discussion about permissibility of anonymous functions).

Online demo

A straight translation into CJam is (with thanks to Martin Büttner for shaving a couple of characters)

{:X_*,3fb{2bX=},}


Dissection

{             # Function boilerplate
  :^          # Store parameter as variable ^
  .*          # Square parameter - see detailed explanation below
  ,{3base}%   # Produce an array of 0 to ^*^-1 in ternary
  {2base^=},  # Filter to those which evaluate to ^ in binary
}


The reason for the squaring operation is that we need to iterate up to the largest possible value whose ternary representation, interpreted in binary, is equal to ^. Since 2 = 10, the "normal" binary representation of ^ is the one which matters. If we convert that to ternary, we find that the "worst" cases are powers of 2. An optimal approach would be to take the argument to the power of ln 3/ln 2 ~= 1.585, but squaring is much shorter.