3

I have found a new problem which asks:

Find the remainder when $10^{10}+10^{10^2}+.........+10^{10^{10}}$ is divided by $7$.

I am thinking to find the remainder using Fermet's theorem, but I think I am unable to do it.

Please help.

Bill Dubuque
  • 272,048

4 Answers4

6

You are right. You should use Fermat's Little Theorem to solve this problem. Fermat's Little Theorem tells us $10^6 \equiv 1 \pmod{7}$, meaning that we can subtract $6$ from each power without affecting the remainder. This means we can just find the remainder of the powers when divided by $6$ and then use those powers. $$10 \equiv 4 \pmod 6$$ $$10^2 \equiv 4^2 \equiv 16 \equiv 4 \pmod 6$$ $$10^3 \equiv 4^3 \equiv 64 \equiv 4 \pmod 6$$ Hopefully, you see the pattern. All of the powers are equivalent to $4 \pmod 6$. Thus, we can replace each $10^{10^a}$ with $10^4$, giving us a sum of $10\cdot 10^4=10^5$. Now, we need to compute $10^5 \pmod 7$: $$10^5 \equiv 3^5 \equiv 243 \equiv 5 \pmod 7$$

Noble Mushtak
  • 18,402
  • 28
  • 44
5

Observe that $\gcd(10,7)=1$.

Therefore by Euler's theorem: $10^{\phi(7)}\equiv1\pmod7$.

Since $7$ is prime: $\phi(7)=7-1=6$.

Therefore: $10^6\equiv1\pmod7$.

Therefore:

  • $10^{10^{1}}\equiv10^{6\cdot1+4}\equiv(\color\red{10^{6}})^{1}\cdot10^{4}\equiv\color\red1^{1}\cdot10^{4}\equiv10000\equiv4\pmod7$
  • $10^{10^{2}}\equiv10^{6\cdot16+4}\equiv(\color\red{10^{6}})^{16}\cdot10^{4}\equiv\color\red1^{16}\cdot10^{4}\equiv10000\equiv4\pmod7$
  • $10^{10^{3}}\equiv10^{6\cdot166+4}\equiv(\color\red{10^{6}})^{166}\cdot10^{4}\equiv\color\red1^{166}\cdot10^{4}\equiv10000\equiv4\pmod7$
  • $\dots$

We can easily prove by induction that $\forall{n\in\mathbb{N}}:10^{10^{n}}\equiv4\pmod7$.

Therefore: $\sum\limits_{n=1}^{10}10^{10^{n}}\equiv\sum\limits_{n=1}^{10}4\equiv40\equiv5\pmod7$.

barak manos
  • 43,109
3

Yes, You can use Fermat's theorem here.

By Fermat's theorem, $10^6\equiv 1 \pmod 7$.

Hence, $10^{6m}\equiv 1 \pmod 7$ for all $m$.

Now, $$10\equiv 4 \pmod 6, 10^2\equiv 40 \equiv 4 \pmod 6$$

By induction, $10^n \equiv 4 \pmod 6$ for all $n$

Thus, $10^n=6m+4$

and $$10^{10n}=10^{6m}\times10^4\equiv 10^4 \pmod 7 \equiv 4 \pmod 7$$

Consequently,

$$10^{10}+10^{10^2}+..........+10^{10^{10}} \equiv 4 \times 10 \pmod 7\equiv 5 \pmod 7$$

So, remainder is $5$.

1

Hint $\ \ \color{#0a0}{a^{\large 9}\equiv\bf 1}\,\Rightarrow\,a^{\large 10^{\Large N}}\!\!\equiv a\ \ $ by $\ \ \overbrace{a^{\large\color{#c00}{10^{\Large N}}}\equiv a^{\large \color{#c00}{1+9K}}} ^{\ \ \ \large \color{#c00}{10^{\large N}}\, \equiv\, \color{#c00}{1} \pmod{\!\color{#c00} 9}} \!\equiv a(\color{#0a0}{a^{\large 9}})^{\large K} \!\equiv a (\color{#0a0}{\bf 1})^{\large K} \!\equiv a$

Bill Dubuque
  • 272,048
  • Above we used $!\bmod 9!:\ 10^n\equiv 1^n\equiv 1,$ and mod order reduction. See also here for an idempotent viewpoint. The OP is case $a = 10^{10}$, so $!\bmod 7!:\ a \equiv 3^4\equiv 2^2,,$ so $,a^9 \equiv (2^6)^3\equiv 1^3\ \ $ – Bill Dubuque Mar 19 '23 at 17:17
  • Or $\large !\bmod 7!:! \underbrace{10^{\large \color{#c00}{10}^k}!!\equiv (-4)^{\large \color{#c00}4^k}}_{{\rm MOR},\ \color{#c00}{10\ \equiv\ 4}\pmod{!6}}!!\overset{2:!\mid:! 4^k!!}\equiv, 4^{\large 4^k}!!\equiv 4,$ by $,\large 4^4\equiv 4,$ & induction, & MOR = mod order reduction $\ \ $ – Bill Dubuque Mar 19 '23 at 18:40