<s>[INST] find the maximum value of $m$ where $3^m$ be a factor of $A_{1395}$. 
Consider the number $A_{1395}=\underbrace{333\cdots3}_{1395}$. what is
the maximum value of $m$ where $3^m$ be a factor of $A_{1395}$.
$a) 2\quad\quad b)3\quad\quad c)4\quad\quad d)5\quad\quad e)6$

Here is my attempt :
We have $A_{1395}=3\times \underbrace{111\dots1}_{1395}$ sum of the digits of $\underbrace{111\cdots1}_{1395}$ is $1395$ which is a multiply of $9$. therefor this number is dividable to $9$. so we conclude $A_{1395}$ has the factor $3^3$ . to see whether it has more factor of $3$ or not I divided it to $27$. after doing some steps of long division I got:
$$\underbrace{11\cdots1}_{1395}÷27=4115226\cdots$$
Unfortunately I couldn't see any pattern as the result. so I don't know how to check this number has more factor of $3$ or not.
 [/INST] Write using the binomial theorem,
\begin{align}
999\cdots 9 &= 10^{1395} -1 \\
&= (1+9)^{1395} -1 \\
&= \left(\array{1395\\1}\right)\cdot 9 + \left(\array{1395\\2}\right)\cdot9^2 + \cdots 9^{1395}
\end{align}
But $1395 = 3^2 \cdot 5 \cdot 31$.  So, the first term is divisible by $3^4$ and each term thereafter is divisible by $3^5$ meaning the sum is divisible $3^4$ and not by $3^5$.  Accordingly, $333\cdots 3$ is divisible by $3^3$ but not $3^4$.  The answer is therefore $3$.
</s>