Data Structures & AlgorithmsHardGATE CS · ICPC regional

What is the multiplicative order of 2 modulo 17 (the smallest k > 0 with 2^k ≡ 1 mod 17)?

  1. A. 9
  2. B. 10
  3. C. 8
  4. D. 12

Correct answer: C. 8

The powers of 2 modulo 17 cycle as 2, 4, 8, 16, 15, 13, 9, 1, so the order is 8. The order always divides phi(17) = 16.

More Arrays, Strings, Linked Lists, Stacks, Queues and Hashing questions

Exams that ask this topic