# Conjectures on fractions where each digit appears once in numerator and denominator

This is a highly redacted version of a question that was asked before. Please see Criteria of considering relevance of the question to the domain of research topics for details.

Some numerical experimentation (which could be considered recreational mathematics) has led to some curious observations which I don't properly understand but which might have number-theoretic import. I am hoping experts here can shed some light. If this is not considered appropriate for MathOverflow, then I apologize, and I ask for advice on a more suitable place to ask.

Among recreational enthusiasts, it has often been noted that the rational number

$$\frac{9876543210}{1234567890}$$

is very close to being an integer (the exact value is $8.0000000729$). What seems to be less well-known is that there are a number of such fractions, in which each digit appears exactly once in the numerator and denominator, with the same value as above, provided that we allow $0$ to be a leading digit:

$$\frac{7901234568}{0987654312}\;\; \frac{6913580247}{0864197523}\;\; \frac{4938271605}{0617283945}\;\; \frac{3950617284}{0493827156}\;\; \frac{1975308642}{0246913578}\;\; \frac{0987654321}{0123456789}$$

Each of these has the same value $8.0000000729$, or $\frac{109739369}{13717421}$ as a rational number in reduced form.

In more formal terms, there are thus $7$ pairs of permutations $(\phi, \psi)$ on the set $\{0, 1, 2, 3, 4, 5, 6, 7, 8, 9\}$ such that the base 10 expansions

$$[\phi, \psi] := \frac{\sum_{i=0}^9 \phi(i) \cdot 10^i}{\sum_{i=0}^9 \psi(i) \cdot 10^i}$$

all yield the same value $\frac{a}{b}$.

Thus, let us define two permutation pairs $(\phi, \psi)$ to be equivalent if they yield the same rational value $[\phi, \psi]$ displayed above. Some equivalence classes are very large: the one where $[\phi, \psi] = 1$ has $10! = 3628800$ pairs, and the one where $[\phi, \psi] = 10$, given by $w0/0w$ where $w$ is a string with nine nonzero digits, has $9! = 362880$ pairs. Let us discard those possibilities as uninteresting, and consider just those pairs where $1 < [\phi, \psi] < 10$. Then some extensive computer experimentation, courtesy of R. Cano and described in detail in a Mathematics Stackexchange thread here, suggests that $7$ is the size of the largest equivalence class for the remaining pairs, and this size is attained just for the value $\frac{a}{b} = \frac{109739369}{13717421}$ or its reciprocal.

My questions have to do with what happens in other bases besides base 10.

Question 1: For other bases $r$, consider permutations $\phi$ on the set $\{0, 1, \ldots, r-1\}$, and again define an equivalence relation on pairs of permutations $(\phi, \psi)$ where two such are equivalent if they yield the same rational value $$\frac{\sum_{i=0}^{r-1} \phi(i)\cdot r^i}{\sum_{i=0}^{r-1} \psi(i)\cdot r^i}.$$ As above, let us restrict attention to pairs where $1 < [\phi, \psi] < r$. What is the size of the largest equivalence class? Calculations for the cases $r = 2, 3, \ldots, 10$ seem to yield, respectively, the sizes $2,2,3,3,5,3,7,5,7$. This looks suspiciously like one of the OEIS sequences here, all having to do with Euler's totient function.

Question 2: Which rational value $\frac{a}{b}$ represents this largest equivalence class? Putting $n = r-1$, my conjecture is that
$$\frac{(n - 1) (n+1)^{n+1} + 1}{(n+1)^{n+1}-n^2-n-1}$$ yields the maximum number, although there could be more than one such fraction. (Note that this is just a closed form expression for the base-$r$ expression $\frac{n\; n-1\; \ldots\; 1}{1\; 2\; \ldots\; n}$, analogous to $\frac{987654321}{123456789}$.)

There are other questions that could be asked; more can be found at the Mathematics StackExchange link given above. But this would be a good start for me.

PS - this version of the question is kindly written by Todd Trimble with additional input from Gerry Myerson. I am very much thankful to Gerry and especially to Todd for their time and help in trying to improve the quality of my question!

• As I noted at another discussion of this question, if $w$ is any of the 362,880 9-digit numbers using all digits except zero, then $w0/0w=10$, and 362,880 is considerably bigger than 7. OP explained that what's wanted is ratios strictly between 1 and the base, but that detail seems to have been omitted in the current incarnation of the question. – Gerry Myerson Jul 17 '14 at 1:24
• This is a very preliminary comment -- I'm doing various calculations -- but I suppose it hasn't escaped your notice that the subject seems very closely related to base-$r$ representations of $1/(r-1)^2$? – Todd Trimble Jul 18 '14 at 15:12