Construct $n$ integers in base $n^2$ that are in the ratio of $1:2:\cdots :n$ using every digit exactly once

323 Views Asked by At

Consider the following problem:

Given an positive integer $n$, construct $n$ integers $a_1,a_2,\cdots ,a_n$ in base $n^2$. Each of the numbers $0,1,\cdots ,n^2-1$ should occur in the digits of $a_i$ exactly once. $a_1:a_2:\cdots a_n=1:2:\cdots n$. leading zeros are allowed.

(Here is a Chinese version, which might be a little clearer. The description is slightly different, and I hope they are equivalent.)

给定正整数 $n$,构造 $n$$n^2$ 进制下的 $n$ 位数(允许前导零),满足所有数的每个数码都不一样,且这 $n$ 个数呈 $1:2:\cdots n$ 的比例关系。

For example, $(03)_4:(12)_4=1:2$ for $n=2$, $(0DA7)_{16}:(1B4E)_{16}:(28F5)_{16}:(369C)_{16}=1:2:3:4$ for $n=4$.

I wonder:

  • For what $n$ does a solution exist?
  • The construction of one (or all) solution(s).

I came up with the problem a few months ago and worked on it with my classmate for a few days. We conjected that:

  • (unproven, validated for $n\leq 200$) The following solution is legal if and only if $n+1$ is prime:
    • The digits (from higher to lower) of $a_1$ are $0,n^2-(n-1),n^2-2(n-1),\cdots ,n^2-(n-1)^2$, respectively.
    • $a_i=i\times a_1$ for $i\geq 2$.
    • Replacing $a_1$ with $n-2,n-2+(n-1),\cdots ,n-2+(n-2)(n-1), n^2-1$ leads to the same result.
  • (unproven, validated for $n\leq 10$) The only solutions are constructed by those two ways.
    • The only counterexample is $(12)_4:(30)_4=1:2$.
  • (unproven) Write the solution constructed by the first way as a matrix $A$. For example, when $n=4$, $$A=\begin{pmatrix} 0 &13 &10 &7 \\ 1 &11 &4 &14\\ 2 &8 &15 &5 \\ 3 &6 &9 &12\\ \end{pmatrix}$$ Then $(A_{i,j}\bmod n)+1 = ij\bmod (n+1)$.