MathDB
2015-2016 Fall OMO #22

Source:

November 18, 2015
Online Math Open

Problem Statement

Let W=x1x0x1x2W = \ldots x_{-1}x_0x_1x_2 \ldots be an infinite periodic word consisting of only the letters aa and bb. The minimal period of WW is 220162^{2016}. Say that a word UU appears in WW if there are indices kk \le \ell such that U=xkxk+1xU = x_kx_{k+1} \ldots x_{\ell}. A word UU is called special if Ua,Ub,aU,bUUa, Ub, aU, bU all appear in WW. (The empty word is considered special) You are given that there are no special words of length greater than 2015.
Let NN be the minimum possible number of special words. Find the remainder when NN is divided by 10001000. Proposed by Yang Liu