login
a(n) = LCM of the lengths of runs of 1-bits in binary representation of n.
6

%I #15 Mar 13 2018 04:12:07

%S 1,1,1,2,1,1,2,3,1,1,1,2,2,2,3,4,1,1,1,2,1,1,2,3,2,2,2,2,3,3,4,5,1,1,

%T 1,2,1,1,2,3,1,1,1,2,2,2,3,4,2,2,2,2,2,2,2,6,3,3,3,6,4,4,5,6,1,1,1,2,

%U 1,1,2,3,1,1,1,2,2,2,3,4,1,1,1,2,1,1,2,3,2,2,2,2,3,3,4,5,2,2,2,2,2,2,2,6,2,2,2,2,2,2,6,4,3,3,3,6,3,3,6,3,4

%N a(n) = LCM of the lengths of runs of 1-bits in binary representation of n.

%H Antti Karttunen, <a href="/A284569/b284569.txt">Table of n, a(n) for n = 0..10922</a>

%H <a href="/index/Bi#binary">Index entries for sequences related to binary expansion of n</a>

%F a(n) = A072411(A005940(1+n)).

%F a(n) = A227349(n) / A284562(n).

%e For n = 27, in binary A007088(27) = "11011", the lengths of runs of 1-bits are [2,2], thus a(27) = lcm(2,2) = 2.

%e For n = 55, in binary A007088(55) = "110111", the lengths of runs of 1-bits are [2,3], thus a(55) = lcm(2,3) = 6.

%o (Scheme)

%o (define (A284569 n) (apply lcm (bisect (reverse (binexp->runcount1list n)) (- 1 (modulo n 2))))) ;; For bisect and binexp->runcount1list, see the Program section of A227349.

%o (define (A284569 n) (A072411 (A005940 (+ 1 n))))

%Y Cf. A005940, A072411, A227349, A284562, A284559.

%Y Cf. A003714 (positions of ones).

%Y Differs from A227349 for the first time at n=27, where a(27)=2, while A227349(27)= 4.

%Y Differs from A038374 for the first time at n=55, where a(55) = 6, while A038374(55) = 3.

%K nonn,base

%O 0,4

%A _Antti Karttunen_, Apr 14 2017