Skip to content

GATE CS 2016 Set 2 Q29 — Combinatorics: Counting, Recurrence Relations, Generating Functions

Explain with AI
The value of the expression 1399(mod17)13^{99}\pmod{17} in the range 00 to 1616, is ________.
View worked solution

Answer: 4

We need to find the value of 1399(mod17)13^{99} \pmod{17}.

Since 1717 is a prime number and gcd⁡(13,17)=1\gcd(13, 17) = 1, we can apply Fermat's Little Theorem:

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

Substituting a=13a = 13 and p=17p = 17 gives:

1316≡1(mod17)13^{16} \equiv 1 \pmod{17}

Now, we divide the exponent 9999 by 1616:

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

Using this, we can simplify the expression:

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

To compute 133(mod17)13^3 \pmod{17} easily, we can use negative residues:

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

Since 17×4=6817 \times 4 = 68:

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

Thus, the value of 1399(mod17)13^{99} \pmod{17} is 4.

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

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