How to find the remainder of $\frac{2^{99}}{9}$? The question is solved in the book I read in a very odd way as,

$$\frac{2^{99}}{9} = \dfrac{{(2^{3})}^{33}}{2^3-(-1)}$$
  Hence by remainder theorem the remainder is $-1$. In questions when remainder is negative than the number is subtracted from numbers like $2^3$ to get a positive number so the answer is $8-{-1}=9$.

I don't know which remainder theorem the book is talking of. I converted the question in mod notation as,
$$2^{99} \bmod 9 = (2^3)^{33} \bmod (2^3 - (-1))$$
But I don't think there is some formula for $a \bmod (c-d)$. Please tell me how to solve these type of questions.
 A: $$2^{99} \equiv (2^3)^{33} \equiv 8^{33} \equiv (-1)^{33} \equiv -1 \equiv 8 \pmod 9$$  
A: The theorem referred to is probably the polynomial remainder theorem. That is that the remainder of $p(x)/(x-a)$ is $p(a)$. So with $p(x) = x^{33}$ and $a=-1$ we have that the remainder of the division will be $p(-1) = (-1)^{33}$. That is:
$$p(x) = x^{33} = (x-(-1))q(x) + (-1)^{33} = (x-(-1))q(x) - 1$$
Inserting $x = 2^3$ into this results in 
$$p(2^3) = (2^3-(-1))q(2^3) - 1 = 9q(2^3)-1$$
From this we can see that $2^{99} = 9q(2^3) - 1 = 9q(2^3)-9+8 = 9(q(2^3)-1) + 8$ and since $q$ is a polynomial with integer terms we have that $Q = q(2^3)-1$ is an integer so $2^{99} = 9Q + 8$

For proof of the polynomial remainder theorem let $p(x)$ be a polynomial and use euclid division with $x-a$ then we will get a result $q(x)$ and a remainder $r(x)$ of degree one less than $x-a$, that is r(x) is a constant expression $C$. Now the result of the division will be 
 $$p(x) = q(x)(x-a) + r(x) = q(x)(x-a) + C$$. 
Now substitute $x$ with $a$ and we get 
$$p(a) = q(a)(a-a) + C = 0q(a) + C = C$$
A: To solve questions like this, the usual approach is using 
$$\def\mod{\mathbin{\rm mod}} ab \mod n = (a \mod n)(b\mod n) \mod n $$
iteratively. Let's start. We have that 
$$ 2^{99} = 2^{4\cdot 24 + 3} = 8 \cdot 16^{24} $$
reducing modulo $9$, we have 
$$ 2^{99}\mod 9 = 8 \cdot 7^{24} \mod 9 $$
But $7^{24} = 49^{12}$, reducing again and continue in that way
\begin{align*}
  2^{99} \mod 9 &= 49^{12}\cdot 8 \mod 9\\
                &= 4^{12} \cdot 8 \mod 9\\
                &= 16^6 \cdot 8 \mod 9\\
                &= 7^6 \cdot 8 \mod 9\\
                &= 49^3 \cdot 8 \mod 9\\
                &= 4^3 \cdot 8 \mod 9\\
                &= 16^2 \cdot 2 \mod 9\\
                &= 49 \cdot 2 \mod 9\\
                &= 8.
\end{align*}
A: It could be that the book was using the geometric sum formula instead
$$
\frac{1-x^{n+1}}{1-x}=1+x+x^2+\ldots+x^n.
$$
In this way we get
$$
A=\frac{1-(-2^3)^{33}}{1-(-2^3)}=1-2^3+2^6-\ldots+2^{32}\in\mathbb{N}
$$
and
$$
\frac{2^{99}}{9}=\frac{1-(-2^3)^{33}-1}{1-(-2^3)}=A-\frac{1}{9}.
$$
