OFFSET
1,3
COMMENTS
See the Wikipedia link for the construction method of 1/n in factorial base.
LINKS
Rémy Sigrist, Table of n, a(n) for n = 1..10000
Rémy Sigrist, Colored scatterplot of the first 25000 terms (where the color is function of A052126(n))
Wikipedia, Factorial number system (Fractional values)
FORMULA
a(n!) = 1 for any n >= 0.
a(n! / k) = k for any n > 1 and k = 1..n-1.
a(p) = p - 1 for any prime p.
EXAMPLE
The first terms, alongside 1/n in factorial base, are:
n a(n) 1/n in factorial base
-- ---- ---------------------
1 1 1
2 1 0.1
3 2 0.0 2
4 2 0.0 1 2
5 4 0.0 1 0 4
6 1 0.0 1
7 6 0.0 0 3 2 0 6
8 3 0.0 0 3
9 3 0.0 0 2 3 2
10 2 0.0 0 2 2
11 10 0.0 0 2 0 5 3 1 4 0 10
12 2 0.0 0 2
13 12 0.0 0 1 4 1 2 5 4 8 5 0 12
14 3 0.0 0 1 3 3 3
15 3 0.0 0 1 3
16 3 0.0 0 1 2 3
17 16 0.0 0 1 2 0 2 3 6 8 9 0 9 2 7 0 16
18 4 0.0 0 1 1 4
19 18 0.0 0 1 1 1 6 2 0 9 5 2 6 11 11 13 8 0 18
20 1 0.0 0 1 1
MATHEMATICA
a[n_] := Module[{m = 0, r = 1, f = 1/n}, While[f > 0, m = Max[m, Floor[f]]; r++; f = FractionalPart[f]*r]; m]; Array[a, 77] (* Jean-François Alcover, Feb 05 2018, translated from PARI *)
PROG
(PARI) a(n) = my (m=0, r=1, f=1/n); while (f>0, m = max(m, floor(f)); r++; f = frac(f)*r); return (m)
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Rémy Sigrist, Jan 31 2018
STATUS
approved