s = 0 unseen = 1 seen(v) = bittest(s, v) see(v) = s = bitor(s, 2^v); while (seen(unseen), unseen++) { for (n = 1, 10 000, if (n==1, v = 1, n==2, v = 6, for (w=unseen, oo, if (!seen(w), if (omega(w)==1, see(w), !issquarefree(w), see(w), gcd(pp, w)==1 && gcd(p, w)>1 && p % w, v = w; break; ); ); ); ); see(v); f = factor(v); m = sum(i=1, #f~, 2^primepi(f[i, 1]))/2; print (n " " m); [pp, p] = [p, v]; ); } quit