<s>[INST] If the $81$ digit number $111\cdots 1$ is divided by $729$, the remainder is? 
If the $81$ digit number $111\cdots 1$ is divided by $729$, the remainder is?

$729=9^3$
For any number to be divisible by $9$, the sum of the digits have to be divisible by $9$. The given number is divisible by $9$.
Then I tried dividing the given number by $9$. The quotient was like $123456789012\cdots$
So the quotients sum is $(45\times 8)+1=361$
Is this the way to proceed? Is there a shorter way?
 [/INST] We are looking for
$ x = 10^{80} + 10^{79} + \dots + 10^2 + 10 + 1 \mod{9^3}$
$ 10^k = (9 + 1)^k = \sum\limits_{i=0}^{k}{k \choose i}9^i $ (Binomial theorem)
Considering the second equality $\mod{9^3} $, we only need first three summands of the sum. So $ 10^k \equiv 1 + k\cdot 9 + \frac{k\cdot(k-1)}{2}\cdot 9^2\mod{9^3}$. So what we're looking for is
$$ x\mod{9^3} \equiv\sum\limits_{k=0}^{80}1 + 9k + 81\frac{k\cdot(k-1)}{2} \mod{9^3} = \sum\limits_{k = 0}^{80}1 - \frac{63}{2}k + \frac{81}{2}k^2$$
Using formulas $ \sum_{k=0}^n k = \frac{n(n+1)}{2}, \sum\limits_{k=0}^n k^2 = \frac{n(n+1)(2n+1)}{6} $ we get that
$$ x \mod{9^3} = 81 + \frac{-63}{2}\cdot80\cdot81\cdot\frac{1}{2} + \frac{81}{2}\cdot80\cdot81\cdot161\cdot\frac{1}{6} \mod{9^3}$$
$$ x \mod{9^3} =  81 + 81((-63)\cdot20 + 20\cdot27\cdot161) \mod{9^3}$$ 
Notice the term in brackets is divisible by $ 9 $, hence the answer is $ 81 $.
I'm not sure that's the best way to approach this. Please correct me if any of the calculations were wrong
</s>