MathDB
2020 Team 5

Source:

February 2, 2020
team2020

Problem Statement

We say that a binary string ss contains another binary string tt if there exist indices i1,i2,,iti_1,i_2,\ldots,i_{|t|} with i1<i2<<iti_1 < i_2 < \ldots < i_{|t|} such that si1si2sit=t.s_{i_1}s_{i_2}\ldots s_{i_{|t|}} = t. (In other words, tt is found as a not necessarily contiguous substring of ss.) For example, 110010110010 contains 111111. What is the length of the shortest string ss which contains the binary representations of all the positive integers less than or equal to 20482048?