<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] According to Wolfy,
or by repeated use of
$x^3-1
=(x-1)(x^2+x+1)
$,
$\frac{x^{81}-1}{x-1}
= (x^2+x+1) (x^6+x^3+1) (x^{18}+x^9+1) (x^{54}+x^{27}+1)
$.
Since
$x^{3n} \equiv 1 \bmod (x^3-1)$,
$x^{6n}+x^{3n}+1
\equiv 3 \bmod (x^3-1)
$.
Therefore
the right 3 factors
are all
$\equiv 3 \bmod (x^3-1)
$.
Therefore the whole product
$\equiv 27(x^2+x+1)
\bmod (x^3-1)
$.
Since 
$\begin{array}\\
x^2+x+1
&=((x-1)+1)^2+(x-1)+2\\
&=(x-1)^2+2(x-1)+1+(x-1)+2\\
&=(x-1)^2+3(x-1)+3\\
\end{array}
$
we have 
$\begin{array}\\
27(x^2+x+1)
&=27((x-1)^2+3(x-1)+3)\\
&=27(x-1)^2+81(x-1)+81\\
&\equiv 81 \bmod 729
\qquad\text{setting }x=10
\text{ since }27\cdot 9^2, 81\cdot 9 
\equiv 0 \bmod 729\\
\end{array}
$
Therefore
the answer is
$81$.
</s>