Jelly, 20 17 bytes
BJŒċṬUḄ^;⁸ÆḍṂỊµÐḟ
Try it online!Try it online!
How it works
BJŒċṬUḄ^;⁸ÆḍṂỊµÐḟ Main link. Argument: n
µ Combine all links to the left into a chain.
Ðḟ Filter-false; keep only integers k from [1, ..., n] for which
the chain returns 0.
B Convert k to binary.
J Get the indices of all digits.
Œċ Take all combination of two indices, with replacement.
Ṭ Untruth; map each index pair [i, j] to the Boolean array of
length j that has 1's at (and only at) indices i and j.
U Upend; reverse each Boolean array.
Ḅ Unbinary; convert each array from base 2 to integer.
^ XOR the resulting numbers with k.
;⁸ Append k to the resulting list.
Æḍ Count the number of proper divisors of each result.
Ṃ Take the minimum.
Ị Insignificant; test if the minimum is 0 or 1.