GATE Computer ScienceVery hardGATE CS (PYQ pattern)

For how many integers n with 2 ≤ n ≤ 60 does the congruence x² ≡ 1 (mod n) have exactly 4 solutions x in {0, 1, …, n − 1}?

  1. A. 17
  2. B. 13
  3. C. 20
  4. D. 24

Correct answer: C. 20

Write n = 2ᵃ·m with m odd. The count is s(2ᵃ)·2^ω(m), where s = 1 for a ≤ 1, 2 for a = 2, 4 for a ≥ 3. Exactly 4: m with two odd prime factors and a ≤ 1 (15, 21, 33, 35, 39, 45, 51, 55, 57, 30, 42) = 11; a = 2 and m an odd prime power (12, 20, 28, 36, 44, 52) = 6; a ≥ 3, m = 1 (8, 16, 32) = 3. Total 20.

More Discrete Mathematics questions

Exams that ask this topic