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.

Showing 1-6 of 6 results.

A321321 Numbers n for which the "partition-and-add" operation applied to the binary representation of n results in only one power of 2.

Original entry on oeis.org

1, 3, 5, 6, 7, 9, 11, 12, 13, 14, 17, 19, 21, 24, 25, 28, 31, 33, 35, 37, 41, 42, 48, 49, 56, 65, 67, 69, 73, 81, 87, 96, 97, 112, 129, 131, 133, 137, 145, 161, 167, 192, 193, 224, 257, 259, 261, 265, 273, 289, 321, 384, 385, 448, 513, 515, 517, 521, 529, 545
Offset: 1

Views

Author

Jeffrey Shallit, Nov 04 2018

Keywords

Comments

Conjecture: With the exception of a(1) = 1 and a(17) = 31, all terms have a binary weight of 2 or 3. - Peter Kagey, Jun 14 2019

Examples

			For n = 13, we can partition its binary representation as follows (showing partition and sum of terms): (1101):13, (1)(101):6, (11)(01):4, (110)(1):7, (1)(1)(01):3, (1)(10)(1):4, (11)(0)(1):4, (1)(1)(0)(1):3.  Thus there is only one possible power of 2, namely 4.
		

Crossrefs

A331851 a(n) is the number of distinct values obtained by partitioning the binary representation of n into consecutive blocks, and then multiplying the numbers represented by the blocks.

Original entry on oeis.org

1, 1, 2, 2, 2, 4, 3, 3, 2, 5, 4, 7, 3, 7, 4, 5, 2, 6, 5, 9, 4, 7, 7, 11, 3, 9, 7, 11, 4, 11, 6, 7, 2, 7, 6, 11, 5, 11, 9, 14, 4, 11, 7, 15, 7, 15, 11, 17, 3, 11, 9, 13, 7, 15, 11, 19, 4, 14, 11, 19, 6, 17, 8, 11, 2, 8, 7, 13, 6, 13, 11, 17, 5, 10, 11, 21, 9
Offset: 0

Views

Author

Rémy Sigrist, Jan 29 2020

Keywords

Comments

This sequence is a variant of A321318.

Examples

			For n = 6:
- the binary representation of 6 is "110",
- we can split it in 4 ways:
      "110" -> 6
      "1" and "10" -> 1*2 = 2
      "11" and "0" -> 3*0 = 0
      "1" and "1" and "0" -> 1*1*0 = 0
- we have 3 distinct values,
- hence a(6) = 3.
		

Crossrefs

Cf. A321318 (additive variant).
Cf. A331852 (XOR variant), A331853 (AND variant), A331854 (OR variant).
Cf. A331855 (reverse variant).

Programs

  • PARI
    See Links section.

Formula

a(2^k) = 2 for any k > 0.
a(2^k+1) = k+2 for any k > 1.

A321319 Smallest power of 2 obtainable by partitioning the binary representation of n into consecutive blocks and then summing.

Original entry on oeis.org

1, 1, 2, 1, 2, 2, 4, 1, 2, 2, 4, 2, 4, 4, 4, 1, 2, 2, 4, 2, 4, 4, 4, 2, 4, 4, 4, 4, 4, 4, 16, 1, 2, 2, 4, 2, 4, 4, 4, 2, 4, 4, 4, 4, 4, 4, 8, 2, 4, 4, 4, 4, 4, 4, 8, 4, 4, 4, 8, 4, 8, 8, 8, 1, 2, 2, 4, 2, 4, 4, 4, 2, 4, 4, 4, 4, 4, 4, 8, 2, 4, 4, 4, 4, 4, 4
Offset: 1

Views

Author

Jeffrey Shallit, Nov 04 2018

Keywords

Examples

			For n = 13, we can partition its binary representation as follows (showing partition and sum of terms): (1101):13, (1)(101):6, (11)(01):4, (110)(1):7, (1)(1)(01):3, (1)(10)(1):4, (11)(0)(1):4, (1)(1)(0)(1):3.  Thus the smallest power of 2 is 4.
		

Crossrefs

A321320 Largest power of 2 obtainable by partitioning the binary representation of n into consecutive blocks and then summing.

Original entry on oeis.org

1, 2, 2, 4, 2, 2, 4, 8, 2, 4, 4, 2, 4, 4, 8, 16, 2, 4, 4, 4, 4, 8, 8, 2, 4, 8, 8, 4, 8, 8, 16, 32, 2, 4, 4, 8, 4, 8, 8, 4, 4, 4, 8, 8, 8, 16, 16, 2, 4, 8, 8, 8, 8, 8, 16, 4, 8, 16, 16, 8, 16, 16, 32, 64, 2, 4, 4, 8, 4, 8, 8, 8, 4, 8, 8, 16, 8, 16, 16, 4, 4, 8
Offset: 1

Views

Author

Jeffrey Shallit, Nov 04 2018

Keywords

Examples

			For n = 13, we can partition its binary representation as follows (showing partition and sum of terms): (1101):13, (1)(101):6, (11)(01):4, (110)(1):7, (1)(1)(01):3, (1)(10)(1):4, (11)(0)(1):4, (1)(1)(0)(1):3.  Thus the largest power of 2 is 4.
		

Crossrefs

A306921 Number of ways of breaking the binary expansion of n into consecutive blocks with no leading zeros.

Original entry on oeis.org

1, 1, 2, 2, 3, 3, 4, 4, 4, 4, 6, 6, 6, 6, 8, 8, 5, 5, 8, 8, 9, 9, 12, 12, 8, 8, 12, 12, 12, 12, 16, 16, 6, 6, 10, 10, 12, 12, 16, 16, 12, 12, 18, 18, 18, 18, 24, 24, 10, 10, 16, 16, 18, 18, 24, 24, 16, 16, 24, 24, 24, 24, 32, 32, 7, 7, 12, 12, 15, 15, 20, 20, 16
Offset: 0

Views

Author

Peter Kagey, Mar 16 2019

Keywords

Comments

The number 0 is not considered to have a leading zero.
a(n) >= 2^(A000120(n) - 1).
a(2^n - 1) = 2^(n-1) for n > 0.
a(2^n) = n+1.
Conjecture: n appears A067824(n) times for n > 1.

Examples

			For n = 13 the a(13) = 6 partitions are [1101], [1, 101], [110, 1], [1, 10, 1], [11, 0, 1], and [1, 1, 0, 1].
Notice that [1, 1, 01] and [11, 01] are not valid partitions because the last part has a leading zero.
		

Crossrefs

A321318 gives number of distinct sums of such partitions.

Formula

From Charlie Neder, May 08 2019: (Start)
If n = k*2^e + {0,1} with k odd and e > 0, then a(n) = a(k)*(e+1).
Proof: Each partition of n is uniquely determined by a partition of k (call it K) and a choice of some number, from 0 to e, of trailing digits to append to the final part in K, since any remaining digits must appear as singletons. The conjecture follows, since each ordered factorization of a number m produces two numbers n such that a(n) = m, one of each parity, and A067824(n) = 2*A074206(n).
Corollary: For n >= 1, a(2n) = a(2n+1) = Product{k+1 | k in row n of A066099}. (End)

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.

Original entry on oeis.org

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

Views

Author

Peter Kagey, Mar 16 2019

Keywords

Comments

1's appear at indices given by A321321.

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
		

Crossrefs

Showing 1-6 of 6 results.