Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #14 Mar 03 2018 09:48:40
%S 1,2,6,3,3,6,24,24,24,24,8,8,12,12,4,4,12,12,8,8,24,24,24,24,120,120,
%T 40,40,120,120,20,20,60,60,60,60,120,120,120,120,40,40,15,30,10,5,15,
%U 30,60,60,60,60,20,20,120,120,40,40,120,120,10,5,15,30,30,15
%N In factorial base, any rational number has a terminating expansion; hence we can devise a self-inverse permutation of the rational numbers, say f, such that for any rational number q, the representations of q and of f(q) in factorial base are mirrored around the radix point and q and f(q) have the same sign; a(n) = the denominator of f(n).
%C See A299161 for the corresponding numerators and additional comments.
%H Rémy Sigrist, <a href="/A299160/b299160.txt">Table of n, a(n) for n = 0..10000</a>
%H Wikipedia, <a href="https://en.wikipedia.org/wiki/Factorial_number_system#Fractional_values">Factorial number system (Fractional values)</a>
%H <a href="/index/Fa#facbase">Index entries for sequences related to factorial base representation</a>
%F a(n!) = (n+1)! for any n > 0.
%e The first terms, alongside f(n) and the factorial base representations of n and of f(n), are:
%e n a(n) f(n) fact(n) fact(f(n))
%e -- ---- ---- ------- ----------
%e 0 1 0 0 0.0
%e 1 2 1/2 1 0.1
%e 2 6 1/6 1 0 0.0 1
%e 3 3 2/3 1 1 0.1 1
%e 4 3 1/3 2 0 0.0 2
%e 5 6 5/6 2 1 0.1 2
%e 6 24 1/24 1 0 0 0.0 0 1
%e 7 24 13/24 1 0 1 0.1 0 1
%e 8 24 5/24 1 1 0 0.0 1 1
%e 9 24 17/24 1 1 1 0.1 1 1
%e 10 8 3/8 1 2 0 0.0 2 1
%e 11 8 7/8 1 2 1 0.1 2 1
%e 12 12 1/12 2 0 0 0.0 0 2
%e 13 12 7/12 2 0 1 0.1 0 2
%e 14 4 1/4 2 1 0 0.0 1 2
%e 15 4 3/4 2 1 1 0.1 1 2
%e 16 12 5/12 2 2 0 0.0 2 2
%e 17 12 11/12 2 2 1 0.1 2 2
%e 18 8 1/8 3 0 0 0.0 0 3
%e 19 8 5/8 3 0 1 0.1 0 3
%e 20 24 7/24 3 1 0 0.0 1 3
%t Block[{nn = 65, m}, m = 1; While[Factorial@ m < nn, m++]; m; {1}~Join~Denominator@ Array[NumberCompose[Prepend[#, 0], 1/Range[Length@ # + 1]!] &@ Reverse@ IntegerDigits[#, MixedRadix[Reverse@ Range[2, m]]] &, nn]] (* _Michael De Vlieger_, Feb 10 2018 *)
%o (PARI) a(n) = my (v=0); for (r=2, oo, if (n==0, return (denominator(v))); v += (n%r)/r!; n\=r)
%Y Cf. A299161.
%K nonn,base,frac
%O 0,2
%A _Rémy Sigrist_, Feb 04 2018