• S
    SwaseekhGATE Preparation
General
  • Dashboard
  • Syllabus
  • Questions
  • Aptitude
  • Mock Tests
  • TCS NQT 2026
Account
  • Pricing
  • Contact
  1. GATE CS
  2. PYQs
  3. Discrete Mathematics

Consider the recurrence relation a_1 = 1, a_{2n} = 2*a_n - 1, and a_{2n+1} = 2*a_n + 1, for n >= 1. The value of a_{100} is __________.

GATE 2016 · Discrete Mathematics · Recurrence Relation · medium

Answer: a_{100} = 73.

  1. Trace the index chain from 100 to 1: 100 = 2*50 (even); 50 = 2*25 (even); 25 = 2*12+1 (odd); 12 = 2*6 (even); 6 = 2*3 (even); 3 = 2*1+1 (odd); base: a_1 = 1.
  2. Build values bottom-up: a_1 = 1. a_3 = 2*a_1 + 1 = 2*1 + 1 = 3. a_6 = 2*a_3 - 1 = 2*3 - 1 = 5. a_{12} = 2*a_6 - 1 = 2*5 - 1 = 9. a_{25} = 2*a_{12} + 1 = 2*9 + 1 = 19. a_{50} = 2*a_{25} - 1 = 2*19 - 1 = 37. a_{100} = 2*a_{50} - 1 = 2*37 - 1 = 73.