Using $a^3+b^3=(a+b)(a^2-ab+b^2)$ to prove $3^{n+2}$ does not divide $2^{3^n}+1$ Prove for all natural numbers $n$ such that $2^{3^n}+1$ is not divisible by $3^{n+2}$.
My working for not divisible: Induction proof
Base case: n = 0
$$3^{0+2}=9$$
and
$$2^{3^0}+1=3$$
9 cannot divide 3, so base case is true.
Assume n=k is true. That means $B=3^{k+2}$ does not divide $A=2^{3^k}+1$. Now prove $3^{k+3}$ does not divide $2^{3^{k+1}}+1$.
Using $a^3+b^3=(a+b)(a^2-ab+b^2)$:
$$(2^{3^k})^3+1=(2^{3^k}+1)((2^{3^k})^2-2^{3^k}+1)$$
$$=A((2^{3^k})^2-A+2)$$
$$3^{k+3}=3\times 3^{k+2}$$
$$=3B$$

That's where I need help!

I want to show that $A((2^{3^k})^2-A+2)$ is not divisible by $3B$ by using hypothesis "$A$ is not divisible by $B$".

Hint: It is easy to see that $$3~|~(2^{3^k})^2-2^{3^k}+1$$ but $$9\nmid(2^{3^k})^2-2^{3^k}+1.$$
Note: To complete the proof, use the Unique Factorization Theorem of integers and count the multiplicity of the prime factor $3$. (This theorem requires only the Division Algorithm to prove.)
An alternative formal way to show that $3B\nmid A\cdot((2^{3^k})^2-A+2)$ is to use the 3-adic order: Compare the $3$-adic order $\nu_3$ of the two integers, one has $$\nu_3(3B)=\nu_3(3)+\nu_3(B)=1+\nu_3(B)$$ and $$\nu_3(A\cdot ((2^{3^k})^2-A+2))=\nu_3(A)+\nu_3((2^{3^k})^2-A+2)=\nu_3(A)+1,$$ where the latter equality follows from the above suggestions and comments.
Now the induction hypothesis $B\nmid A$ shows that $$\nu_3(B)>\nu_3(A)$$
$$\Rightarrow \nu_3(B)+1>\nu_3(A)+1$$
$$\Rightarrow 3B\nmid A\cdot((2^{3^k})^2-A+2),$$ completing the case $n=k+1$ and the proof by induction.
