Y by Adventure10, Mango247
Ana and Beto play against each other. Initially, Ana chooses a non-negative integer
and announces it to Beto. Next Beto writes a succession of
numbers,
of them equal to
and
of them equal to
. 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
, Ana wins. If not, Beto wins. Determine all values of
for which Ana can ensure victory, no matter how Beto plays.







