Placement AptitudeVery hardProduct company OA · CAT level

For how many integers n with 1 ≤ n ≤ 100 is 2ⁿ − n divisible by 5?

  1. A. 25
  2. B. 16
  3. C. 20
  4. D. 24

Correct answer: C. 20

2ⁿ mod 5 repeats with period 4 (2, 4, 3, 1) and n mod 5 with period 5, so the pair repeats with period 20. For each residue of n mod 4 the required residue of n mod 5 is fixed and never 0, and CRT gives exactly one n in each block of 20: n ≡ 1 (mod 4) and 2 (mod 5) → 17; n ≡ 2, 4 → 14; n ≡ 3, 3 → 3; n ≡ 0, 1 → 16. So 4 values per block of 20 (3, 14, 16, 17) and 4 × 5 = 20 values up to 100. 25 assumes 2ⁿ mod 5 behaves like a random residue hit 'one time in four'; 16 loses a block.

More Advanced Quantitative Ability (Placement) questions

Exams that ask this topic