for some odd number $X$ in $A$, consider the sequence $X, 2X, 4X, 8X...$ The rule that no element can be twice another is equivalent to saying that we can take at most every second element from any such sequence. The only question then is whether to start at $X$ or $2X$. If the chainsequence has an even number of elements it doesn't matter, but otherwise we will get one more number by starting at $X$.
def greatest_subset(): result = [] for i in range(1, 256, 2): while i <= 256: result.append(i) i *= 4 return result