#!perl -lnfor$i(0..$_){$i-(sprintf"%b",$_)=~y/1//||print for 0..2**$_-1}
4
0 1 2 4 8 3 5 6 9 10 12 7 11 13 14 15
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!