Problem

Source: Iranian TST 2022 problem 6

Tags: number theory, combinatorics, Game Theory



Let $m,n$ and $a_1,a_2,\dots,a_m$ be arbitrary positive integers. Ali and Mohammad Play the following game. At each step, Ali chooses $b_1,b_2,\dots,b_m \in \mathbb{N}$ and then Mohammad chosses a positive integers $s$ and obtains a new sequence $\{c_i=a_i+b_{i+s}\}_{i=1}^m$, where $$b_{m+1}=b_1,\ b_{m+2}=b_2, \dots,\ b_{m+s}=b_s$$The goal of Ali is to make all the numbers divisible by $n$ in a finite number of steps. FInd all positive integers $m$ and $n$ such that Ali has a winning strategy, no matter how the initial values $a_1, a_2,\dots,a_m$ are.

HIDE: clarification after we create the $c_i$ s, this sequence becomes the sequence that we continue playing on, as in it is our 'new' $a_i$

Proposed by Shayan Gholami