\(B=\left(1+5+5^2\right)+\left(5^3+5^4+5^5\right)+\left(5^6+5^7+5^8\right)\\ B=\left(1+5+5^2\right)+5^3\left(1+5+5^2\right)+5^6\left(1+5+5^2\right)\\ B=\left(1+5+5^2\right)\left(1+5^3+5^6\right)=31\left(1+5^3+5^6\right)⋮31\)
\(B=\left(1+5+5^2\right)+...+5^6\left(1+5+5^2\right)\)
\(=31\left(1+...+5^6\right)⋮31\)