Sum or difference of two powers of two
Python 2, 43 bytes



lambda n:[len(bin((n&amp;-n)+k))-3for k in n,0]


Say that n==2^a ± 2^b with a&gt;b. Then, the greatest power-of-2 factor of n is 2^b, and we can find it using the bit-trick 2^b = n&amp;-n. That lets us compute 2^b + n, which equals either 2^a + 2 * 2^b or just 2^a. Either one has the same-length bit-length as a*. So, we output the bit-lengths of n&amp;-n and (n&amp;-n)+n, computed from the lengths of their binary representations. Python 3 is one byte longer for parens in for k in(n,0)].

*Except that 2^a + 2^b with a==b+1 has one longer bit-length, but that's fine because we can interpret that as 2^(a+1)-2^b.