solve[(2^r)k+(2^(r-1))=x, r>0, x>0, k>0, r]