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++) { t = 0; for (n = 1, 10 000, if ((t + unseen) % n==0, v = unseen, c = chinese(-Mod(t, n), -Mod(t+unseen, n+1)); forstep (w = (unseen\c.mod)*c.mod + lift(c), oo, c.mod, if (w && !seen(w), v = w; break; ); ); ); see(v); print (n " " v); t += v; ); } quit