MathDB
2013-2014 Fall OMO #27

Source:

October 30, 2013
Online Math OpenprobabilityinductionPascal's Triangle

Problem Statement

Ben has a big blackboard, initially empty, and Francisco has a fair coin. Francisco flips the coin 20132013 times. On the nthn^{\text{th}} flip (where n=1,2,,2013n=1,2,\dots,2013), Ben does the following if the coin flips heads: (i) If the blackboard is empty, Ben writes nn on the blackboard. (ii) If the blackboard is not empty, let mm denote the largest number on the blackboard. If m2+2n2m^2+2n^2 is divisible by 33, Ben erases mm from the blackboard; otherwise, he writes the number nn. No action is taken when the coin flips tails. If probability that the blackboard is empty after all 20132013 flips is 2u+12k(2v+1)\frac{2u+1}{2^k(2v+1)}, where uu, vv, and kk are nonnegative integers, compute kk.
Proposed by Evan Chen