login
A299161
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 numerator of f(n).
3
0, 1, 1, 2, 1, 5, 1, 13, 5, 17, 3, 7, 1, 7, 1, 3, 5, 11, 1, 5, 7, 19, 11, 23, 1, 61, 7, 27, 41, 101, 1, 11, 13, 43, 23, 53, 11, 71, 31, 91, 17, 37, 2, 19, 3, 4, 7, 29, 1, 31, 11, 41, 7, 17, 7, 67, 9, 29, 47, 107, 1, 3, 4, 23, 13, 14, 17, 77, 37, 97, 19, 39, 1
OFFSET
0,4
COMMENTS
See A299160 for the corresponding denominators.
The function f restricted to the nonnegative integers establishes a bijection from the nonnegative integers to the rational numbers q such that 0 <= q < 1, hence n -> a(n) / A299161(n) runs uniquely through all rational numbers q such that 0 <= q < 1.
The rational numbers q = n + f(n) for some integer n are the fixed points of f.
If two rational numbers, say p and q, have the same sign and can be added without carry in factorial base, then f(p + q) = f(p) + f(q).
FORMULA
a(n) < A299160(n) for any n >= 0.
a(n!) = 1 for any n >= 0.
EXAMPLE
The first terms, alongside f(n) and the factorial base representations of n and of f(n), are:
n a(n) f(n) fact(n) fact(f(n))
-- ---- ---- ------- ----------
0 0 0 0 0.0
1 1 1/2 1 0.1
2 1 1/6 1 0 0.0 1
3 2 2/3 1 1 0.1 1
4 1 1/3 2 0 0.0 2
5 5 5/6 2 1 0.1 2
6 1 1/24 1 0 0 0.0 0 1
7 13 13/24 1 0 1 0.1 0 1
8 5 5/24 1 1 0 0.0 1 1
9 17 17/24 1 1 1 0.1 1 1
10 3 3/8 1 2 0 0.0 2 1
11 7 7/8 1 2 1 0.1 2 1
12 1 1/12 2 0 0 0.0 0 2
13 7 7/12 2 0 1 0.1 0 2
14 1 1/4 2 1 0 0.0 1 2
15 3 3/4 2 1 1 0.1 1 2
16 5 5/12 2 2 0 0.0 2 2
17 11 11/12 2 2 1 0.1 2 2
18 1 1/8 3 0 0 0.0 0 3
19 5 5/8 3 0 1 0.1 0 3
20 7 7/24 3 1 0 0.0 1 3
MATHEMATICA
Block[{nn = 72, m}, m = 1; While[Factorial@ m < nn, m++]; m; {0}~Join~Numerator@ Array[NumberCompose[Prepend[#, 0], 1/Range[Length@ # + 1]!] &@Reverse@ IntegerDigits[#, MixedRadix[Reverse@ Range[2, m]]] &, nn]] (* Michael De Vlieger, Feb 10 2018 *)
PROG
(PARI) a(n) = my (v=0); for (r=2, oo, if (n==0, return (numerator(v))); v += (n%r)/r!; n\=r)
CROSSREFS
Cf. A299160.
Sequence in context: A092142 A348497 A376021 * A327249 A173108 A173111
KEYWORD
nonn,base,frac
AUTHOR
Rémy Sigrist, Feb 04 2018
STATUS
approved