I expect the result to be around $40$, but I do not know how to get there?
Not necessary to read:
I'm doing this because I'm wondering how many (printable!) characters I need for a password strength of $256$ bit. $256$ bit is $2^{256}$ possibilities. In theory it would take $32$ characters, IF every character had $8$ totally random bits. But since I'm restricted to the printable characters, I only get 95 (space until ~) possibilities per $8$ bits (instead of $256$). That is how I came up with the equation above - which I think is correct, I just don't know how to solve it.
Take logs:
$$ 256 \log_2 2 = x \log_2 95 $$
and then solve for $x$.