2025 SSMO Team Round Problems/Problem 10

Problem

Anna has a three term arithmetic sequence of integers. She divides each term of her sequence by a positive integer $n>1$, and tells Bob that the three resulting remainders are $20$, $52$, and $R$, in some order. For how many values of $R$ is it possible for Bob to uniquely determine $n$?

Solution

Notice that if $20$, $52$, and $R$ are (in some order) the terms of an arithmetic sequence, then it is impossible for Bob to uniquely determine $n$, as the terms of Anna's arithmetic sequence could be $20$, $52$, and $R$ and $n$ could be arbitarily large. Henceforth, we assume $R \ne 36,84$ (trivally, the $R = -12$ case is a non-issue).

Suppose that the terms of Anna's sequence are $a$, $b$, and $c$, in that order, and let $x$, $y$, and $z$ be the remainders when $a$, $b$, and $c$ are divided by $n$, respectively. We know that $(20,52,R)$ is a permutation of $(x,y,z)$. Note that we must have $y-x \equiv z-y \pmod{n}$, which is equivalent to $n$ dividing $|x-2y+z|$. Since $0\le x,y,z < n$, we have $|x-2y+z| \le \max\{x+z, 2y\} < 2n$. Furthermore, we cannot have $|x-2y+z| = 0$, as this would imply that $x$, $y$, and $z$ are in arithmetic progression. Thus, we must have $|x-2y+z| = n$.

Now, the key is to rephrase the condition $n = |x-2y+z|$ in terms of the three inequalities $n = |x-2y+z| > x, y, z$. There are two possibilities here; either $x+z > 2y$ (implying $n=x-2y+z$) or $2y > x+z$ (implying $n=2y-x-z$). We handle each case separately.

Possibility 1: $x+z > 2y$. The three inequalities $n > x,y,z$ become:

  • $z > 2y$;
  • $x+z > 3y$;
  • $x>2y$.

Notice that these inequalities are equivalent to $x,z > 2y$, as this condition implies $x+z > 2y+2y \ge 3y$. Also, crucially, observe that if $x,z > 2y$, without knowing anything about $n$, we can say that $n = x-2y+z$ because $x+z > 2y$.

Possibility 2: $2y > x+z$. The three inequalities in question become:

  • $2y > 2x+z$;
  • $y > x+z$;
  • $2y>x+2z$.

These inequalities together are equivalent to the single condition $y > x+z$, as from this we can derive $2y > 2x+2z \ge 2x+z, x+2z$. Similarly to the previous case, we make the observation that if $y > x+z$, without knowing anything about $n$, we can say that $n = 2y-x-z$ because $2y > x+z$.

Therefore, we have just demonstrated the existence of the follwing two pairs of equivalent statements: $n = x-2y+z$ if and only if $x,z > 2y$, and $n = 2y-x-z$ if and only if $y > x+z$. Let $u$, $v$, and $w$ be $20$, $52$, and $R$ in increasing order. From what we have just shown, we know that either $v,w > 2u$ or $w > u+v$ (possibly both). We seek to characterize when Bob is able to uniquely determine $n$ in terms of $u$, $v$, and $w$.

If $v,w > 2u$ holds but $w > u+v$ does not, Bob can uniquely determine $n$ to be $v-2u+w$. Similarly, if $w > u+v$ holds but $v,w > 2u$ does not, Bob can uniquely determine $n$ to be $2w-u-v$. However, if both the conditions $v,w>2u$ and $w > u+v$ hold, it is possible for $n$ to equal either $u-2v+w$ or $2w-u-v$. For Bob to be able to uniquely determine $n$, these values must be equal, implying $u-2v+w=0$. However, this is impossible because $u$, $v$, and $w$ cannot be in arithmetic progression.

Hence, Bob can uniquely determine $n$ if and only if exactly one of the two conditions $2u<v,w$ and $u+v<w$ holds. All that remains is to count the number of possible values of $R$, which we do by casework.

Case 1: $0\le R < 20$. In this case, we always have $R + 20 < 52$ and $2R < 52$, so we must have $2R \ge 20$. There are $10$ possible values of $R$ in this case.

Case 2: $20\le R < 32$. In this case, we always have $R+20 < 52$ and $2(20) \ge R$, so $R$ can be anything in this case's range. There are $12$ possible values of $R$ in this case.

Case 3: $32\le R < 52$. In this case, we always have $R+20\ge 52$ and $2(20)< 52$, so we must have $2(20) < R$. There are $11$ possible values of $R$ in this case.

Case 4: $52\le R \le 72$. In this case, we always have $20+52\ge R$ and $2(20) < 52, R$, so $R$ can be anything in this case's range. There are $21$ possible values of $R$ in this case.

Case 5: $72 < R$. In this case, we always have $20+52< R$ and $2(20) < 52, R$, so there are no possible values of $R$ in this case.

This exhausts all possibilities for $R$, and thus the answer is $10+12+11+21+0 = \boxed{54}$.

~Sedro