login
A299199
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) = f(1/n).
1
1, 4, 14, 98, 2, 4386, 18, 324, 60, 36457092, 12, 5769254382, 2598, 78, 414, 335391687123174, 510, 115428139222691670, 30, 1926, 20204166, 24752828962220504429646, 6, 1032336, 3124309416, 149376, 3816, 8542182056001396008878674488976, 96
OFFSET
2,2
COMMENTS
See A299161 for additional comments about f.
This sequence corresponds to the indices of ones in A299161.
FORMULA
A034968(a(n)) = A276350(n) for any n > 1.
A299160(a(n)) = n for any n > 1.
A299161(a(n)) = 1 for any n > 1.
EXAMPLE
The first terms, alongside the factorial base representations of a(n) and of 1/n, are:
n a(n) fact(a(n)) fact(1/n)
-- ---------- ----------------------- ------------
2 1 1 0.1
3 4 2 0 0.0 2
4 14 2 1 0 0.0 1 2
5 98 4 0 1 0 0.0 1 0 4
6 2 1 0 0.0 1
7 4386 6 0 2 3 0 0 0.0 0 3 2 0 6
8 18 3 0 0 0.0 0 3
9 324 2 3 2 0 0 0.0 0 2 3 2
10 60 2 2 0 0 0.0 0 2 2
11 36457092 10 0 4 1 3 5 0 2 0 0 0.0 0 2 0 5 3 1 4 0 10
12 12 2 0 0 0.0 0 2
13 5769254382 12 0 5 8 4 5 2 1 4 1 0 0 0.0 0 1 4 1 2 5 4 8 5 0 12
14 2598 3 3 3 1 0 0 0.0 0 1 3 3 3
15 78 3 1 0 0 0.0 0 1 3
16 414 3 2 1 0 0 0.0 0 1 2 3
PROG
(PARI) a(n) = my (v=0, q=1/n); for (r=2, oo, q *= r; v += floor(q) * (r-1)!; q = frac(q); if (q==0, return (v)))
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Rémy Sigrist, Feb 04 2018
STATUS
approved