Is the repunit $R_{3^k}$ divisible by $3^k$? By the repunit $R_n$ is meant the base ten positive integer consisting of $n$ digits all 1. My question is whether when $n=3^k$ we have the repunit divisible by $3^k$. I checked up to $R_{243}$, a moderate check I realize, but wasn't sure of my software to go much further. If anyone knows a proof/counterexample it would be appreciated. Or a reference.

$R_{3^1}=111$ is divisible by $3^1=3$. Now suppose $3^k\mid R_{3^k}$, so $R_{3^k}=3^kq$ for an integer $q$. Then
$$R_{3^{k+1}}=(10^{2\cdot3^k}+10^{3^k}+1)R_{3^k}$$
and the parenthesised expression is easily seen to be 0 modulo 3, hence of the form $3p$ for $p$ an integer, so
$$R_{3^{k+1}}=3p\cdot3^kq=pq3^{k+1}$$
showing that $3^{k+1}\mid R_{3^{k+1}}$; the given statement follows by induction.
