Find the base number $n$

algebra-precalculusnumber-systems

The unit digits of each of $X$ and $Y$ when expressed to the base $n$ is $a$. If the unit digit of $\frac{X+Y}{2}$ when expressed in base $n$ is either $2$ or $5$, find $n$
This was an MCQ type question.

The options given were:- 8,6,10,12 and 14.

I tried a lot but could not figure out how to start the problem. I'm only looking for a useful hint, not the full solution.
Any help would be appreciated.

P.S:- I understand that this is a very ill-formatted question and also my saying that "i could not figure out" would inspire some suspicion on the reader's part…but I assure you that this I have genuinely tried to solve this question. Also, this is not a homework problem.

Thank you!

Best Answer

Notice that all of the possible bases are even numbers. We will need that.

Let's look at what happens in base $10$.

\begin{array}{c|c} a \mod{10} & 2a \mod{10} \\ \hline 0, 5 & 0 \\ 1, 6 & 2 \\ 2, 7 & 4 \\ 3, 8 & 6 \\ 4, 9 & 8 \\ \hline \end{array}

There are exactly two values of $a$ for each value of $2a$. That this is true for every even base, $B$, follows from

$$2a \equiv 2b \mod{B} \iff a \equiv b \mod \frac B2$$

Since the possible values of $a$ are $2$ and $5$. Then $\frac B2 = 5 - 2 = 3$ and so $B = 6$.