n = 0 nb = [0] emit(v) = { print (n++ " " v); while (v, v -= 2^e = valuation(v, 2); while (1+e > #nb, nb = concat(nb, vector(#nb)); ); nb[1+e]++; ); } { emit(1); while (n < 2^13, apply (emit, select(sign, nb)); ); } quit