So I was playing around with numbers in my free time and I stumbled across this neat little trick,
If
$X = A^B + C$
Where
$A$ is any integer
$B$ is an integer greater than $1$
$C$ is not a multiple of $A^B$
Then $X$ and $C$ will both be divisible by $A$ the same number of times.
So for example
$3^3 - 6 = 21$, $6$ and $21$ are only divisible by $3$ once
$2^5 + 8 = 40$, $8$ and $40$ are divisible by $8$
I find this really interesting and was wondering why it works.
This can be simply explained through algebra and is a property of equations using integers. If you have an equation of the form
$$a=m(b+c)\,\,\,,\,\,\,a,b,c,m\in\mathbb Z\,\,\,,\,\,\,m\neq 0$$
then you can deduce that $a$ must be divisible by $m$ (as any property that applies to one side also applies to the other side of the equation as they're equal).
That's exactly what's happening in the example you give.
First consider the case where $X=A^ix$ where $i\in\mathbb N_0$ and $x$ is not a multiple of $A$, then you can rewrite your equation as
$$X=A^ix=A^B+C$$ $\implies$ $$C=A^ix-A^B$$
If $i\ge B$, then we can conclude
$$C=A^B(A^{i-B}x-1)$$
which means $A^B$ divides $C$, breaking one of your conditions.
Therefore, $i<B$ and we get
$$C=A^i(x-A^{B-i})$$
which means $A^i$ divides $C$.
Now let us consider the case where $C=A^jc$ where $j\in\mathbb N_0$ and $C$ is not a multiple of $A$. Now our equation is
$$X=A^B+A^jc$$
If $j\ge B$ then we can again conclude
$$X=A^B(1-A^{j-B}c)$$
which means $A^B$ divides $C$ breaking one of your conditions.
Therefore, $j<B$ and we get
$$X=A^j(A^{B-j}+c)$$
and so $A^j$ divides $X$.
Now we have shown:
Therefore, $A$ divides $X$ and $C$ the same number of times, leading to your conclusion.