Skip to content

GATE CS 2019 Q21 — Combinatorics: Counting, Recurrence Relations, Generating Functions

Explain with AI
The value of 351 mod 53^{51} \text{ mod } 5 is _____
View worked solution

Answer: 2

To find the value of 351(mod5)3^{51} \pmod 5, we can use Fermat's Little Theorem.

Fermat's Little Theorem states that if pp is a prime number and aa is an integer such that gcd⁡(a,p)=1\gcd(a, p) = 1, then:

ap−1≡1(modp)a^{p-1} \equiv 1 \pmod p

Here, a=3a = 3 and p=5p = 5 (which is prime). Therefore:

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

Now, we express the exponent 5151 in terms of 44:

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

Using this, we can simplify the expression:

351=34×12+3=(34)12×333^{51} = 3^{4 \times 12 + 3} = (3^4)^{12} \times 3^3

Taking modulo 55 on both sides:

351≡(1)12×33(mod5)3^{51} \equiv (1)^{12} \times 3^3 \pmod 5351≡1×27(mod5)3^{51} \equiv 1 \times 27 \pmod 5351≡27(mod5)3^{51} \equiv 27 \pmod 5

Since 27=5×5+227 = 5 \times 5 + 2, we have:

27≡2(mod5)27 \equiv 2 \pmod 5

Thus, the value of 351(mod5)3^{51} \pmod 5 is 2.

Free practice · Your answers on this page are not saved.

Published
Report a correction
Keep exploringMore Combinatorics: Counting, Recurrence Relations, Generating Functions questions