Question

The value of the expression 1399(mod17)13^{99} \pmod{17}, in the range 0 to 16, is ________.

Official answer and solution
Official answer
4
From
Official GATE 2016 answer key

Solution

Apply Fermat's Little Theorem to reduce the power modulo the prime 17.

We want to evaluate 1399(mod17)13^{99} \pmod{17}. Since 17 is a prime number and gcd⁡(13,17)=1\gcd(13, 17) = 1, by Fermat's Little Theorem:

1317−1=1316≡1(mod17)13^{17-1} = 13^{16} \equiv 1 \pmod{17}

Express the exponent 99 in terms of multiples of 16:

99=16×6+399 = 16 \times 6 + 3

Using the properties of modular arithmetic:

1399=(1316)6×133≡(1)6×133≡133(mod17)13^{99} = (13^{16})^6 \times 13^3 \equiv (1)^6 \times 13^3 \equiv 13^3 \pmod{17}

Compute 133(mod17)13^3 \pmod{17} using negative residue representation (13≡−4(mod17)13 \equiv -4 \pmod{17}):

133≡(−4)3=−64(mod17)13^3 \equiv (-4)^3 = -64 \pmod{17}

Divide −64-64 by 17:

−64=17×(−4)+4-64 = 17 \times (-4) + 4

Thus:

−64≡4(mod17)-64 \equiv 4 \pmod{17}

Therefore, 1399(mod17)=413^{99} \pmod{17} = 4.

Final answer

4

Common trap

Reducing the exponent modulo 17 instead of modulo ϕ(17)=16\phi(17) = 16.

The answer is the one in the official GATE answer key. The solution is this site's own explanation.

Source

Paper
GATE 2016 Computer Science and Information Technology (CS) Session 2
Question
39 of 65, printed as CS Q.29
Section
Computer Science and Information Technology

Report an error in this question

GATE questions are the work of the organising institutes. This site is independent and is not affiliated with them.