Question

The value of 351(mod5)3^{51} \pmod 5 is ________.

Official answer and solution
Official answer
2
From
Official GATE 2019 answer key

Solution

Apply Fermat's Little Theorem to compute the remainder of 3^51 modulo 5.

Since p=5p = 5 is prime and gcd⁡(3,5)=1\gcd(3, 5) = 1, Fermat's Little Theorem states that:

35−1=34≡1(mod5)3^{5 - 1} = 3^4 \equiv 1 \pmod 5

Express the exponent 5151 in terms of multiples of 44:

51=4×12+351 = 4 \times 12 + 3

Compute 351(mod5)3^{51} \pmod 5:

351=(34)12×33≡112×27(mod5)≡27(mod5)≡23^{51} = (3^4)^{12} \times 3^3 \equiv 1^{12} \times 27 \pmod 5 \equiv 27 \pmod 5 \equiv 2
Final answer

2

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

Source

Paper
GATE 2019 Computer Science and Information Technology (CS)
Question
31 of 65, printed as CS Q.21
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.