Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Search: a299161 -id:a299161
     Sort: relevance | references | number | modified | created      Format: long | short | data
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).
+10
3
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, 40, 40, 120, 120, 20, 20, 60, 60, 60, 60, 120, 120, 120, 120, 40, 40, 15, 30, 10, 5, 15, 30, 60, 60, 60, 60, 20, 20, 120, 120, 40, 40, 120, 120, 10, 5, 15, 30, 30, 15
OFFSET
0,2
COMMENTS
See A299161 for the corresponding numerators and additional comments.
FORMULA
a(n!) = (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 1 0 0 0.0
1 2 1/2 1 0.1
2 6 1/6 1 0 0.0 1
3 3 2/3 1 1 0.1 1
4 3 1/3 2 0 0.0 2
5 6 5/6 2 1 0.1 2
6 24 1/24 1 0 0 0.0 0 1
7 24 13/24 1 0 1 0.1 0 1
8 24 5/24 1 1 0 0.0 1 1
9 24 17/24 1 1 1 0.1 1 1
10 8 3/8 1 2 0 0.0 2 1
11 8 7/8 1 2 1 0.1 2 1
12 12 1/12 2 0 0 0.0 0 2
13 12 7/12 2 0 1 0.1 0 2
14 4 1/4 2 1 0 0.0 1 2
15 4 3/4 2 1 1 0.1 1 2
16 12 5/12 2 2 0 0.0 2 2
17 12 11/12 2 2 1 0.1 2 2
18 8 1/8 3 0 0 0.0 0 3
19 8 5/8 3 0 1 0.1 0 3
20 24 7/24 3 1 0 0.0 1 3
MATHEMATICA
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 *)
PROG
(PARI) a(n) = my (v=0); for (r=2, oo, if (n==0, return (denominator(v))); v += (n%r)/r!; n\=r)
CROSSREFS
Cf. A299161.
KEYWORD
nonn,base,frac
AUTHOR
Rémy Sigrist, Feb 04 2018
STATUS
approved
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).
+10
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

Search completed in 0.008 seconds