MathLabs

Problem 1

We call a 55-tuple of integers arrangeable if its elements can be labeled a,b,c,d,ea,b,c,d,e in some order so that a−b+c−d+e=29a-b+c-d+e=29. Determine all 20172017-tuples of integers n1,n2,…,n2017n_1,n_2,\ldots,n_{2017} such that if we place them in a circle in clockwise order, then any 55-tuple of numbers in consecutive positions on the circle is arrangeable.
Step 2 of 4: Parity is 55-periodic, hence constant
mi−mi+1+mi+2+mi+3−mi+4≡mi+mi+1+mi+2+mi+3+mi+4(mod2)  ⟹  mi≡mi+5(mod2)m_i-m_{i+1}+m_{i+2}+m_{i+3}-m_{i+4}\equiv m_i+m_{i+1}+m_{i+2}+m_{i+3}+m_{i+4}\pmod2 \implies m_i\equiv m_{i+5}\pmod2
Detailed analysis

Reducing the arrangeable condition modulo 22 (where signs are irrelevant), any 55 consecutive mim_i's satisfy mi+mi+1+mi+2+mi+3+mi+4≡0(mod2)m_i+m_{i+1}+m_{i+2}+m_{i+3}+m_{i+4}\equiv0\pmod2. Comparing this for the window starting at ii with the window starting at i+1i+1 shows mi≡mi+5(mod2)m_i\equiv m_{i+5}\pmod2 for every ii. Since gcd⁡(5,2017)=1\gcd(5,2017)=1, repeatedly stepping by 55 cycles through all 20172017 indices, so all mim_i share the same parity.