MathDB
1008 numbers equal to 1, 1008 equal to -1, split into blocks, count sums, game

Source: Rioplatense Olympiad 2016 level 3 P1

September 5, 2018
game strategycombinatoricsSum of Squaresgame

Problem Statement

Ana and Beto play against each other. Initially, Ana chooses a non-negative integer NN and announces it to Beto. Next Beto writes a succession of 20162016 numbers, 10081008 of them equal to 11 and 10081008 of them equal to āˆ’1-1. Once this is done, Ana must split the succession into several blocks of consecutive terms (each term belonging to exactly one block), and calculate the sum of the numbers of each block. Finally, add the squares of the calculated numbers. If this sum is equal to NN, Ana wins. If not, Beto wins. Determine all values of NN for which Ana can ensure victory, no matter how Beto plays.