%I #8 Mar 31 2012 10:26:00
%S 1,11,101,111,201,211,1001,1011,1101,1111,1201,1211,2001,2011,2101,
%T 2111,2201,2211,3001,3011,3101,3111,3201,3211,10001,10011,10101,10111,
%U 10201,10211,11001,11011,11101,11111,11201,11211,12001,12011,12101,12111
%N Variant of the factorial base representation of n.
%C For n > 0, write n as sum(k = 0 to m, d_k*k!), where m is such that m! < n <= (m+1)!. Conditions d_0 = 1, 0 <= d_k <= k for k > 0 ensure that the representation is unique. a(n) is the concatenation of (the digits) d_m, ..., d_1, d_0.
%C a(n) is obtained by appending "1" to A007623(n-1), the standard factorial base representation of n-1.
%D J. S. Madachy & J. A. H. Hunter, Mathematical Diversions, pp. 73-5 VNR Co. NY
%H K. S. Brown, <a href="http://www.mathpages.com/home/kmath165.htm">The Factorial Number System</a>
%e Determining a(2238): 720 = 6! < 2238 <= 7! = 5040; 2238 = 3*6! + 78; 78 = 3*4! + 6; 6 = 2*2! + 2 (to take 6 = 1*3! is not allowed since then condition d_0 = 1 cannot be met); 2 = 1*1! + 1*0!, so 2238 = 3*6! + 0*5! + 3*4! + 0*3! + 2*2! +
%e 1*1! + 1*0! and a(2238) = 3030211.
%o (PARI) {for(n=1,40,k=n-1; j=1; p=1; w=[]; while(p<=k,w=concat(p, w); j++; p=p*j); v="0"; for(i=1,length(w),d=divrem(k, w[i]); v=concat(v,d[1]); k=d[2]); print1(eval(concat(v,1)),","))}
%Y Cf. A007623.
%K nonn,base
%O 1,2
%A _Lekraj Beedassy_, Jun 18 2002
%E Edited by _Klaus Brockhaus_, Jun 10 2003, Jun 14 2003