MathLabs

Problem 5

Find a sequence of maximal length consisting of non-zero integers in which the sum of any seven consecutive terms is positive and that of any eleven consecutive terms is negative.
Step 5 of 5: Instantiate the pattern and attain the bound
a=7,b=18⟹−5a+2b=1>0,−8a+3b=−2<0a=7,\quad b=18\Longrightarrow -5a+2b=1>0,\quad -8a+3b=-2<0
Detailed analysis

Taking a=7a=7 and b=18b=18 gives the sequence (−7,−7,18,−7,−7,−7,18,−7,−7,18,−7,−7,−7,18,−7,−7)(-7,-7,18,-7,-7,-7,18,-7,-7,18,-7,-7,-7,18,-7,-7). Its seven-term sums equal 11 and its eleven-term sums equal −2-2, so it is valid. Together with the upper bound, the maximum length is 1616.