big = 1 000 000 s = 0 S = [] unseen = 1 seen(v) = if (v < big, bittest(s, v), setsearch(S, v)) see(v) = if (v < big, s = bitor(s, 2^v), S = setunion(S, [v])); while (seen(unseen), unseen++) n = 0 a = vector(5000) emit(v) = { print (n++ " " v); see(v); if (n <= #a, a[n] = v; ); } { emit(1); for (n = 1, #a, for (v = unseen, oo, if (!seen(v) && !seen(w = bitor(v, a[n])) && v!=w, emit(v); emit(w); break; ); ); ); } quit