Mathematics (JEE)ModerateCodeforces Div2 D

What is C(1024, 512) mod 3?

  1. A. 0
  2. B. 1
  3. C. 2
  4. D. 7

Correct answer: A. 0

Lucas' theorem: 1024 = 1101221 and 512 = 0200222 in base 3. In the second digit from the left 512 has a 2 where 1024 has a 1, and C(1, 2) = 0, so C(1024, 512) ≡ 0 (mod 3). Multiplying the digit-wise binomials without spotting that zero factor is the usual slip.

More Permutations, Combinations and Probability questions

Exams that ask this topic