A348138 For any number n with factorial base representation (d_1, ..., d_k), for i = 1..k, let f_i be the number of i's in (d_1, ..., d_k); the factorial base representation of a(n) is (f_1, ..., f_k).
0, 1, 2, 4, 1, 3, 6, 12, 12, 18, 8, 14, 2, 8, 8, 14, 4, 10, 1, 7, 7, 13, 3, 9, 24, 48, 48, 72, 30, 54, 48, 72, 72, 96, 54, 78, 30, 54, 54, 78, 36, 60, 26, 50, 50, 74, 32, 56, 6, 30, 30, 54, 12, 36, 30, 54, 54, 78, 36, 60, 12, 36, 36, 60, 18, 42, 8, 32, 32, 56
Offset: 0
Examples
The first terms, in decimal and in factorial base, are: n a(n) f(n) f(a(n)) -- ---- ---- ------- 0 0 0 0 1 1 1 1 2 2 10 10 3 4 11 20 4 1 20 1 5 3 21 11 6 6 100 100 7 12 101 200 8 12 110 200 9 18 111 300 10 8 120 110
Links
Programs
-
PARI
a(n) = { my (f=[]); for (r=2, oo, if (n==0, return (sum(k=1, #f, f[k]*(#f-k+1)!)), f=concat(f, 0); my (d=n%r); n\=r; if (d, f[d]++))) }
Comments