MathDB
a set of 2^{2016} cards with the numbers 1,2, ..., 2^{2016} written

Source: 2016 Saudi Arabia IMO TST , level 4, I p2

July 29, 2020
combinatorics

Problem Statement

Given a set of 220162^{2016} cards with the numbers 1,2,...,220161,2, ..., 2^{2016} written on them. We divide the set of cards into pairs arbitrarily, from each pair, we keep the card with larger number and discard the other. We now again divide the 220152^{2015} remaining cards into pairs arbitrarily, from each pair, we keep the card with smaller number and discard the other. We now have 220142^{2014} cards, and again divide these cards into pairs and keep the larger one in each pair. We keep doing this way, alternating between keeping the larger number and keeping the smaller number in each pair, until we have just one card left. Find all possible values of this final card.