login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

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

%I #12 Feb 14 2018 03:37:50

%S 1,4,14,98,2,4386,18,324,60,36457092,12,5769254382,2598,78,414,

%T 335391687123174,510,115428139222691670,30,1926,20204166,

%U 24752828962220504429646,6,1032336,3124309416,149376,3816,8542182056001396008878674488976,96

%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) = f(1/n).

%C See A299161 for additional comments about f.

%C This sequence corresponds to the indices of ones in A299161.

%H Rémy Sigrist, <a href="/A299199/b299199.txt">Table of n, a(n) for n = 2..456</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>

%H Rémy Sigrist, <a href="/A299199/a299199.png">Colored logarithmic scatterplot of the first 5000 terms</a> (where the color is function of A299160(n))

%F A034968(a(n)) = A276350(n) for any n > 1.

%F A299160(a(n)) = n for any n > 1.

%F A299161(a(n)) = 1 for any n > 1.

%e The first terms, alongside the factorial base representations of a(n) and of 1/n, are:

%e n a(n) fact(a(n)) fact(1/n)

%e -- ---------- ----------------------- ------------

%e 2 1 1 0.1

%e 3 4 2 0 0.0 2

%e 4 14 2 1 0 0.0 1 2

%e 5 98 4 0 1 0 0.0 1 0 4

%e 6 2 1 0 0.0 1

%e 7 4386 6 0 2 3 0 0 0.0 0 3 2 0 6

%e 8 18 3 0 0 0.0 0 3

%e 9 324 2 3 2 0 0 0.0 0 2 3 2

%e 10 60 2 2 0 0 0.0 0 2 2

%e 11 36457092 10 0 4 1 3 5 0 2 0 0 0.0 0 2 0 5 3 1 4 0 10

%e 12 12 2 0 0 0.0 0 2

%e 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

%e 14 2598 3 3 3 1 0 0 0.0 0 1 3 3 3

%e 15 78 3 1 0 0 0.0 0 1 3

%e 16 414 3 2 1 0 0 0.0 0 1 2 3

%o (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)))

%Y Cf. A034968, A052126, A276350, A299160, A299161.

%K nonn,base

%O 2,2

%A _Rémy Sigrist_, Feb 04 2018