1

The question is:

Prove that:

For $n>1, R_n^k-1$ is divisible by $4$ if $k$ is even. If $k$ is odd, then $R_n^k+1$ is divisible by $4$ where $R_n$ is the rep-unit of length $n$ i.e. $R_3 = 111 , R_5 = 11111, \cdots$.

My Try:

  • First we try to find $a$ such that $R_n\equiv a \pmod 4$.

Notice that we can express these integers as $R_n = \frac{10^n-1}{9}$. Now: $$\frac{10^n-1}{9} \equiv a \pmod 4$$ $$10^n-1 \equiv 9a \pmod 4 \to 10^n-1 \equiv a \pmod 4$$ But $10^n$ is divisible by $4$ for any $n>1$. Hence: $$0-1 \equiv a \pmod 4$$ Implying:

$$a \equiv -1 \pmod 4$$

  • The second step is trivial. If $k$ is odd, then $(-1)^k +1 = -1 + 1 = 0 \pmod 4$, else if $k$ is even, then $(-1)^k -1 = 1-1 = 0 \pmod 4$

Any ideas or notes on the prove?

Is there simpler way to prove so?

Maged Saeed
  • 1,140

1 Answers1

1

Your proof is correct. As for "simpler ways", we may use modular fractions. If $\,\gcd(b,m)=1\,$ then $\,b^{-1}$ exists $\!\bmod m\,$ and $\,a/b := ab^{-1}$ is a unique solution of $\,bx\equiv a\pmod{\!m},\,$ and it satisfies

$\!\bmod m\!:\,\ \begin{align}A&\equiv a\\ B&\equiv b\end{align}\ \Rightarrow\ \dfrac{A}B\equiv \dfrac{a}b \equiv \dfrac{a\bmod m}{b\bmod m}\,\ \ {\bf if} \ \gcd(b,m)=1;\ $ thus

$\bmod \color{#c00}4\!:\,\ R_n := \dfrac{(2i)^{\large n}-1}{4j+1}\, =\, \dfrac{\color{#c00}4i^2 (2i)^{\large n-2}-1}{\color{#c00}4j+1}\,\equiv\, \dfrac{-1}1\ $ for all $\,n\ge 2$

therefore $\ R_n^{\large k}\,\equiv\, (-1)^{\large k}\ $ by Congruence Power Rule. $ $ OP has $\,i = 5,\, j = 2$

Beware $\ $ Modular fraction arithmetic is well-defined only for fractions with denominator coprime to the modulus. See here for further discussion.

Bill Dubuque
  • 272,048