4

My steps: $$4^{44387934 } \mod 10 \\1) \ (4,10) \ne 1 \implies \text{I can't apply the Fermat-Euler theorem} \\ 2) \ \text{I calculate the first powers to see how they behave:} \\4^1\mod 10 \equiv4 \\ 4^2\mod 10 \equiv6 \\ 4^3\mod 10 \equiv4 \\ 4^4\mod 10 \equiv6 \\ ... $$ Ok, now I know that the possible results can only be $4$ or $6$ and the loop(4,6) is of length 2, so I'm going to calculate $44387934 \mod 2$ that is $0$, so $4^0 \mod10 \equiv 1...$ The result should be $1$ but actually is 6, but why? I can't apply any theorem, right?

To understand why 6 came up as result, I tried to apply the Euler theorem: $$\phi(10) = \phi(2)*\phi(5) = 1 \times 4 = 4 \\ 44387934 \mod 4 = \underbrace{44387924}_{ \ \equiv 0 \mod 10} \mod 4 \equiv 2 \\ \text{and } 4^2 \mod 10 \text{ is exactly 6}$$ The problem there is that actually I should not apply the Theorem, so why is 6?

  • 2
    $$4^{xxx} \equiv (-1)^{xxx} = 1 \pmod{5}$$ Then $$4^{xxx} \equiv 6 \text{ or } 1\pmod{10}$$ The case of $1$ is impossible because $4^{xxx}$ is even number. Hence, Q.E.D – NN2 Mar 31 '21 at 21:56
  • Didn’t you just prove 44387934 mod (2) =0, so the result is 6? Where does $4^0$ come from? – Star Bright Mar 31 '21 at 22:09
  • @BrightStar the exponent is $0$ so $4^0$ I think, but maybe I'm working in the wrong way, I should consider the result that comes from the $exponent \mod n$ then start counting elements of the loop (starting from zero), then the corresponding value is the result. that's what I understand from the answers, I'm right? – Loris Simonetti Mar 31 '21 at 22:16
  • 1
    You are correct that Euler's theorem does not apply because $\gcd(4,10)\ne 1$, but $4^0\equiv1$, and you could prove by induction that $ 4^{2n-1}\equiv4, $ and $4^{2n}\equiv6\bmod10$ for $n>0$ – J. W. Tanner Mar 31 '21 at 22:30
  • 1
    Because $\gcd(10,4)\neq 1$, you know that no positive power of $4$ - indeed no multiple of $4$ - is ever going to be $\equiv 1\bmod 10$. And your exploration of initial powers confirmed that, so I'm not sure how your managed to ignore that :-). Still you know that $\phi(10)=4$ and you know that $4=2^2$ so you should definitely expect that since $4^x=2^{2x}$ you should see powers of $4$ exhibiting a $4/2=2$-length cycle, as indeed you do. – Joffan Mar 31 '21 at 22:35

3 Answers3

4

Think about it. If the answer was $1\bmod 10$, that would mean that it is odd, which is clearly absurd. You are correct that the answer loops every $2$, however you don't use $1$ as the start of the loop. Like you said, the loop is $4, 6, 4, 6$, so you actually get $6$ when the exponent is $0\bmod 2$ and $4$ when the exponent is $1\bmod 2$.

Fatso Boo
  • 692
2

Hint: $\bmod 10\!:$ scaling an $\rm\color{#0a0}{even}$ integer by $\,\color{#c00}4\,$ is the same as $\rm\color{#c00}{negating}$ it, i.e.

$\quad\ \underbrace{\bmod 10\!:\ \color{#c00}4(\color{#0a0}2n) \,\equiv\, (\color{#c00}{-1})(\color{#0a0}2n)}_{\textstyle\ \ \ \ \ \ \ \ \ \ \color{#0a0}2n \times \{\color{#c00}4\equiv \color{#c00}{-1}\pmod{\!10/\color{#0a0}2}\}\!\!} \!\!\Rightarrow\ \ \bbox[6px,border:1px solid #c00]{\color{#c00}4^{\large\color{#c00} k}\cdot \color{#0a0}4 \equiv \color{#c00}{(-1)}^{\large \color{#c00}k}\color{#0a0} 4}\ \,$ cf. mod Distributive Law

Bill Dubuque
  • 272,048
1

You are correct that Euler's theorem does not apply because $\gcd(4,10)≠1$,

but $4^0≡1$, and you could prove by induction that $4^{2n−1}≡4$ and $4^{2n}≡6\bmod10$ for $n>0$.

J. W. Tanner
  • 60,406