This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A255054 #19 Feb 17 2015 00:10:05 %S A255054 1,2,3,1,4,3,1,4,4,4,3,1,4,4,5,3,4,4,4,3,1,4,4,5,3,7,5,4,4,4,5,3,4,4, %T A255054 4,3,1,4,4,5,3,7,5,4,7,6,4,6,5,4,4,4,5,3,7,5,4,4,4,5,3,4,4,4,3,1,4,4, %U A255054 5,3,7,5,4,7,6,4,6,5,4,7,6,7,8,5,6,6,4,6,5,4,4,4,5,3,7,5,4,7,6,4,6,5,4,4,4,5,3,7,5,4,4,4,5,3,4,4,4,3,1,4,4,5,3,7,5,4,7,6,4 %N A255054 Run lengths in A255072. %C A255054 Number of integers k which require exactly n steps to reach 0, when starting from k and iterating the map: x -> x - (number of runs in binary representation of x). %H A255054 Antti Karttunen, <a href="/A255054/b255054.txt">Table of n, a(n) for n = 0..16143</a> %F A255054 a(n) = A255053(n+1) - A255053(n). %F A255054 a(n) = 1 + A255055(n) - A255053(n). %F A255054 Other identities. For all n >= 0: %F A255054 a(n) = 1 + A255123(n) + A255124(n). %e A255054 0 is the only number reached from 0 in zero steps, thus a(0) = 1. %e A255054 Both 1 and 2, in binary '1' and '10', when the number of runs (A005811) is subtracted from them, result zero: 1-1 = 2-2 = 0, and these are only such numbers where the zero is reached with one step, thus a(1) = 2. %e A255054 For 3, 4 and 5, in binary '11', '100' and '101', subtracting the number of runs results 2 in all cases, thus two steps are requires to reach zero, and as there are no other such cases, a(2) = 3. %e A255054 For 6, in binary '110', subtracting A005811 repeatedly gives -> 6-2 = 4, 4-2 = 2, 2-2 = 0, three steps in total, and as 6 is the only such number requiring three steps, a(3) = 1. %o A255054 (Scheme, with _Antti Karttunen_'s IntSeq-library, three versions): %o A255054 (define (A255054 n) (- (A255053 (1+ n)) (A255053 n))) %o A255054 (define (A255054 n) (+ 1 (- (A255055 n) (A255053 n)))) %o A255054 (define (A255054 n) (+ (A255123 n) (A255124 n) 1)) %Y A255054 Cf. A005811, A236840, A255053, A255055, A255072, A255123, A255124, A255056. %Y A255054 Cf. A255059 (positions of odd terms), A255060 (positions of even terms), A255061 (apart from its second term 1, gives positions of ones here). %Y A255054 Analogous sequences: A086876, A219644, A219654. %K A255054 nonn %O A255054 0,2 %A A255054 _Antti Karttunen_, Feb 14 2015