Task 5 - 121045
Give all g-adic number systems in which the following problem has at least one solution, and determine all solutions of the problem for these number systems!

Which two-digit number in the g-adic number system has the property that, first, by swapping the two digits, another g-adic two-digit number is obtained, and that, second, by subtracting the latter from the first number, the number 12 in the same number system is obtained?
\end{abstract}

\title{
}

Let \(g>2\) be a fixed natural number. \((g>2\), so that the number 12 can be considered \(g\)-adic at all.) For a two-digit number, the leading (non-unit) digit must not be 0. For the number formed by swapping the digits to also satisfy this, both digits must be different from 0. Let \(a\) and \(b\) be these digits. Then it follows that \(1 \leq a, b < g\) and the equation to be solved is \((a \cdot g + b) - (b \cdot g + a) = g + 2\) or \((a - b) \cdot (g - 1) = g + 2\).

If this equation has a solution, then \(g - 1 \geq 2\) must be a divisor of \(g + 2\), and thus also a divisor of \((g + 2) - (g - 1) = 3\). Therefore, \(g - 1 = 3\) and substituting this gives \(a - b = 2\), so (due to the size constraints for \(a\) and \(b\)) \(a = 3\) and \(b = 1\). Indeed, \(31_{4} - 13_{4} = 12_{4}\), where \(z_{4}\) stands for the digit sequence \(z\) read in base 4.

Summary: The equation to be considered is solvable only in the quaternary system and then has the unique solution \(31_{4}\).