0
$\begingroup$

$x = (5^2 \bmod 6)^4 \bmod 15$.

I wanted to turn $(5^2 \bmod 6)^4 \bmod 15$ into a constant, but I just lost hope when I saw how humongous the expression was.

  • 2
    Humongous? Is $1$ humongous? Maybe to a creature of size $10^{-4}$.2012-11-29
  • 0
    if you had 625, you could do 625-6x10 and do the same thing?2012-11-29
  • 0
    @internetlearning, yes $6 = 0 \mod 6$ so $600 = 0 \mod 6$ so $625 = 25 \mod 6$.2012-11-29
  • 0
    @internetlearning you should start thinking about accepting answers you find helpful.2012-11-30

2 Answers 2

13

$$\begin{eqnarray} && (5^2 \bmod 6)^4 \bmod 15 \\ &=& (25 \bmod 6)^4 \bmod 15 \\ &=& (19 \bmod 6)^4 \bmod 15 \\ &=& (13 \bmod 6)^4 \bmod 15 \\ &=& (7 \bmod 6)^4 \bmod 15 \\ &=& (1 \bmod 6)^4 \bmod 15 \\ &=& 1^4 \bmod 15 \\ &=& 1 \bmod 15 \\ &=& 1 \end{eqnarray}$$

  • 0
    oh you can substract the quotient by the divisor?2012-11-29
  • 0
    @internetlearning, yes because $0 = 6 \mod 6$ we have $x - 0 = x- 6 \mod 6$.2012-11-29
  • 3
    @internetlearning, by the way I would have actually done $5^2 = (-1)^2 \mod 6$ but I thought it's simpler this way when you are just learning about mod.2012-11-29
1

You can actually just directly compute $5^2 = 25$.

Now we have $(25 \bmod 6)^4 \bmod 15 = 1^4 \bmod 15 = 1 \bmod 15$