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++) a(n) = fromdigits(lift(Vec(gcd(Mod(1, 2) * Pol(binary(n)), Mod(1, 2) * Pol(binary(n+1))))), 2) { k = 0; for (n = 1, oo, v = a(n); if (!seen(v), see(v); print (k++ " " v); ); ); } quit