MathDB
Certain numbers appear in process with n double-sided cards

Source: Mexico National Olympiad Mock Exam (OMMock) P3

November 8, 2020
combinatoricscardsBinary

Problem Statement

Let nn be a fixed positive integer. Oriol has nn cards, each of them with a 00 written on one side and 11 on the other. We place these cards in line, some face up and some face down (possibly all on the same side). We begin the following process consisting of nn steps:
1) At the first step, Oriol flips the first card 2) At the second step, Oriol flips the first card and second card . . . n) At the last step Oriol flips all the cards
Let s0,s1,s2,,sns_0, s_1, s_2, \dots, s_n be the sum of the numbers seen in the cards at the beggining, after the first step, after the second step, \dots after the last step, respectively.
a) Find the greatest integer kk such that, no matter the initial card configuration, there exists at least kk distinct numbers between s0,s1,,sns_0, s_1, \dots, s_n. b) Find all positive integers mm such that, for each initial card configuration, there exists an index rr such that sr=ms_r = m.
Proposed by Dorlir Ahmeti