cp's OEIS Frontend

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.

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

Original entry on oeis.org

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, 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, 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
Offset: 0

Views

Author

Antti Karttunen, Apr 14 2017

Keywords

Examples

			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.
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.
		

Crossrefs

Cf. A003714 (positions of ones).
Differs from A227349 for the first time at n=27, where a(27)=2, while A227349(27)= 4.
Differs from A038374 for the first time at n=55, where a(55) = 6, while A038374(55) = 3.

Programs

  • Scheme
    (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.
    (define (A284569 n) (A072411 (A005940 (+ 1 n))))

Formula

a(n) = A072411(A005940(1+n)).
a(n) = A227349(n) / A284562(n).