Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).
%I #19 Sep 27 2016 06:13:12
%S 0,1,2,5,6,13,4,9,10,21,22,45,12,25,26,53,54,109,28,57,58,117,118,237,
%T 8,17,18,37,38,77,20,41,42,85,86,173,44,89,90,181,182,365,92,185,186,
%U 373,374,749,24,49,50,101,102,205,52,105,106,213,214,429,108,217,218,437,438,877,220,441,442,885,886,1773,56,113,114,229,230,461,116,233
%N Factorial base representation of n is rewritten as a base-2 number with each nonzero digit k replaced by a run of k 1's (followed by one extra zero if not the rightmost run of 1's) and with each 0 kept as 0.
%H Antti Karttunen, <a href="/A277012/b277012.txt">Table of n, a(n) for n = 0..5040</a>
%H <a href="/index/Bi#binary">Index entries for sequences related to binary expansion of n</a>
%H <a href="/index/Fa#facbase">Index entries for sequences related to factorial base representation</a>
%F a(n) = A156552(A276076(n)).
%F Other identities. For all n >= 0:
%F A277011(a(n)) = n.
%F A005940(1+a(n)) = A276076(n).
%F A000035(a(n)) = A000035(n). [Preserves the parity of n.]
%F A000120(a(n)) = A034968(n).
%F A069010(a(n)) = A060130(n).
%F A227349(a(n)) = A227153(n).
%e 9 = "111" in factorial base (3! + 2! + 1! = 9) is converted to three 1-bits with separating zeros between, in binary as "10101" = A007088(21), thus a(9) = 21.
%e 91 = "3301" in factorial base (91 = 3*4! + 3*3! + 1!) is converted to binary number "1110111001" = A007088(953), thus a(91) = 953. Between the rightmost 1-runs the other zero comes from the factorial base representation, while the other zero is an extra separating zero inserted after each run of 1-bits apart from the rightmost 1-run. The single zero between the two leftmost 1-runs is similarly used to separate the two "unary representations" of 3's.
%o (Scheme)
%o (define (A277012 n) (let loop ((n n) (z 0) (i 2) (j 0)) (if (zero? n) z (let ((d (remainder n i))) (loop (quotient n i) (+ z (* (A000225 d) (A000079 j))) (+ 1 i) (+ 1 j d))))))
%Y Cf. A000035, A000079, A000120, A000225, A007088, A007623, A034968, A060130, A069010, A156552, A227153, A227349.
%Y Cf. A277008 (terms sorted into ascending order).
%Y Cf. A277011 (a left inverse).
%Y Differs from analogous A277022 for the first time at n=24, where a(24) = 8, while A277022(24) = 60.
%K nonn,base
%O 0,3
%A _Antti Karttunen_, Sep 25 2016