isA144795(n) = my (b=binary(n)); for (i=1, #b, if (b[i]==1, if ( (i==1 || b[i-1]==0) && (i==#b || b[i+1]==0), return (0) ));); return (1)

seen = 0
unseen = 1
other(p) = for (v=unseen, oo, if (!bittest(seen, v) && isA144795(p*v), return (v)))

p=0; for (n=1, 10 000, a = if (n==1, 1, other(p)); print (n " " a); seen += 2^a; while (bittest(seen, unseen), unseen++); p = a)

quit