s = 0 unseen = 1 seen(v) = bit test(s, v) see(v) = s = bit or(s, 2^v); while (seen(unseen), unseen++) prev = 0 seed = 2 base = 2 contains(abc, ab) = { while (1, if (abc % (base^#digits(ab, base)) == ab, return (1), abc < ab, return (0), abc \= base); ); } other() = { for (v=if (prev==0, seed, unseen), oo, if (!seen(v), if (contains(prev+v, v), prev += v; see(v); return (v); ); ); ); } for (n=1, 10 000, v=other(); print (n " " v)); quit