Suppose that $2^b-1\mid 2^a+1$. Show that $b = 1$ or $2$. I'm stuck with this one. I would appreciate any idea how to prove this.

Suppose that $2^b-1 \mid 2^a+1$.
Note that $b$ is the order of $2 \pmod{2^b-1}$. Since $2^{2a} \equiv 1 \pmod{2^b-1}$ we have $b \mid 2a$. 
If $b$ is odd then we get $b \mid a$, so $2^a \equiv 1 \pmod{2^b-1}$. However we also have $2^a \equiv -1 \pmod{2^b-1}$, whence $-1 \equiv 1 \pmod{2^b-1}$, so $b=1$.
Otherwise $b$ is even, so $3 \mid 2^b-1$, so $3 \mid 2^a+1$, so $a$ is odd. Write $b=2c, c \in \mathbb{Z}^+$, so $b \mid 2a$ becomes $c \mid a$. Write $a=kc$. Since $a$ is odd, both $k$ and $c$ are odd. We now get $2^{2c}-1 \mid 2^{kc}+1$.
Thus $(2^c-1)(2^c+1) \mid (2^c+1)(2^{(k-1)c}-2^{(k-2)c}+ \ldots -2^c+1)$
$$2^c-1 \mid (2^{(k-1)c}-2^{(k-2)c}+ \ldots -2^c+1)=\sum_{j=0}^{k-1}{(-1)^j2^{jc}}$$
Now $$\sum_{j=0}^{k-1}{(-1)^j2^{jc}} \equiv \sum_{j=0}^{k-1}{(-1)^j} \equiv 1 \pmod{2^c-1}$$
Therefore $2^c-1 \mid 1$, whence $c=1$, so $b=2$.
In conclusion, $2^b-1 \mid 2^a+1 \Rightarrow b=1, 2$.
