A306922 Number of distinct powers of two obtained by breaking the binary representation of n into consecutive blocks, and then adding the numbers represented by the blocks.
1, 2, 1, 3, 1, 1, 1, 4, 1, 2, 1, 1, 1, 1, 2, 5, 1, 2, 1, 2, 1, 2, 2, 1, 1, 2, 2, 1, 2, 2, 1, 6, 1, 2, 1, 3, 1, 2, 2, 2, 1, 1, 2, 2, 2, 3, 2, 1, 1, 2, 2, 2, 2, 2, 2, 1, 2, 3, 2, 2, 2, 2, 2, 7, 1, 2, 1, 3, 1, 2, 2, 3, 1, 2, 2, 3, 2, 3, 2, 2, 1, 2, 2, 2, 2, 3, 1
Offset: 1
Examples
For n = 46, the a(46) = 3 powers of two that come from the partition of "101110" are 4, 8, and 16: [10, 1110] -> [2, 14] -> 16 [1, 0, 1, 110] -> [1, 0, 1, 6] -> 8 [101, 1, 10] -> [5, 1, 2] -> 8 [1, 0, 111, 0] -> [1, 0, 7, 0] -> 8 [101, 11, 0] -> [5, 3, 0] -> 8 [1, 0, 1, 1, 1, 0] -> [1, 0, 1, 1, 1, 0] -> 4
Links
- Peter Kagey, Table of n, a(n) for n = 1..10000
- Elwyn Berlekamp and Joe P. Buhler, Puzzle 6, Puzzles column, Emissary, MSRI Newsletter, Fall 2011, Page 9, Problem 6.
- Reddit user HarryPotter5777, Partition a binary string so sum of chunks is a power of two. (Proposed proof that a(n) > 0 for all n.)
Comments