GATE / CS ARCHIVE

GATE CSE 2016 SET 2 / QUESTION 29

GATE CSE 2016 Set 2 Q29

Discrete Mathematics · Proof Techniques & Number Theory · Full GATE CSE 2016 Set 2 paper

GATE 2016 Set 2, Q29 2 marks · NAT
Report issue

Proof Techniques & Number Theory

Question 29, GATE 2016: Find 13^99 modulo 17, expressed from 0 through 16.
Tap to enlarge
Answer & solution

Official answer: 4.0 : 4.0

Our answer: 4

13²=169≡−1 modulo 17, so 13⁴≡1. Since99≡3 modulo 4, 1399≡13³≡−13≡4 modulo 17.

The powers cycle as 13,16,4,1 modulo 17. Write 99=4×24+3, then replace 134×24 by 1 and retain the third power. Working modulo after every multiplication avoids enormous integers. The intermediate −13 is a valid congruence but must be reported as 4 in the specified nonnegative range.

Original paper, page 33 · Answer key