a(n) = my (v=0, i=0, x=1);    \
       for (d=2, oo,    \
           if (n==1, return (v));    \
           if (gcd(x,d)==1 && omega(d)==1,    \
               if ((n % d)==0 && gcd(d, n/d)==1,    \
                   v += 2^i;    \
                   n /= d;    \
                   x *= d;    \
               );    \
               i++;    \
           );    \
       );

for (n=1, 10 000, print (n " " a(n)))

quit