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-4 of 4 results.

A331855 a(n) is the number of distinct values obtained by partitioning the binary representation of n into consecutive blocks, and then reversing those blocks.

Original entry on oeis.org

1, 1, 2, 1, 3, 3, 3, 1, 4, 6, 5, 4, 5, 4, 4, 1, 5, 10, 9, 9, 8, 8, 9, 5, 7, 9, 8, 5, 7, 5, 5, 1, 6, 15, 14, 16, 12, 16, 18, 12, 11, 16, 13, 12, 15, 13, 14, 6, 9, 16, 15, 13, 13, 12, 12, 6, 10, 12, 11, 6, 9, 6, 6, 1, 7, 21, 20, 25, 18, 27, 30, 22, 16, 27, 25
Offset: 0

Views

Author

Rémy Sigrist, Jan 29 2020

Keywords

Examples

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

Crossrefs

See A331851 for similar sequences.
See A331856 and A331857 for the least and greatest values, respectively.

Programs

  • PARI
    See Links section.

Formula

a(2^k-1) = 1 for any k >= 0.
a(2^k) = k+1 for any k >= 0.
a(2^k+1) = A000217(k) for any k > 0.
a(2^k+2) = A000096(k-1) for any k > 3.
a(2^k+3) = (k-1)^2 for any k > 1.

A331852 a(n) is the number of distinct values obtained by partitioning the binary representation of n into consecutive blocks, and then applying the bitwise XOR operator to the numbers represented by the blocks.

Original entry on oeis.org

1, 1, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 4, 4, 5, 5, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 6, 6, 6, 6, 8, 8, 7, 7, 8, 8, 8, 8, 8, 8, 9, 9, 10, 10, 9, 9, 10, 10, 9, 9, 10, 10, 11, 11, 11, 11, 9, 9, 8, 8, 7, 7, 10, 10, 10, 10, 11, 11, 10, 10, 11, 11, 11, 11, 12
Offset: 0

Views

Author

Rémy Sigrist, Jan 29 2020

Keywords

Examples

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

Crossrefs

See A331851 for similar sequences.
Cf. A038348.

Programs

  • PARI
    See Links section.

Formula

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

A331853 a(n) is the number of distinct values obtained by partitioning the binary representation of n into consecutive blocks, and then applying the bitwise AND operator to the numbers represented by the blocks.

Original entry on oeis.org

1, 1, 2, 2, 2, 3, 2, 2, 2, 3, 3, 4, 2, 3, 3, 3, 2, 3, 3, 4, 2, 3, 3, 4, 2, 3, 3, 5, 2, 3, 3, 3, 2, 3, 3, 4, 3, 4, 4, 5, 2, 3, 3, 4, 3, 4, 4, 6, 2, 3, 3, 5, 3, 4, 4, 5, 2, 3, 3, 5, 3, 4, 4, 4, 2, 3, 3, 4, 3, 4, 4, 5, 2, 3, 3, 4, 3, 4, 4, 6, 2, 3, 3, 4, 3, 4, 4
Offset: 0

Views

Author

Rémy Sigrist, Jan 29 2020

Keywords

Examples

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

Crossrefs

See A331851 for similar sequences.
Cf. A008619.

Programs

  • PARI
    See Links section.

Formula

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

A331854 a(n) is the number of distinct values obtained by partitioning the binary representation of n into consecutive blocks, and then applying the bitwise OR operator to the numbers represented by the blocks.

Original entry on oeis.org

1, 1, 2, 2, 3, 3, 3, 3, 4, 4, 5, 4, 5, 5, 4, 4, 5, 5, 7, 6, 7, 6, 7, 6, 7, 7, 8, 7, 7, 7, 5, 5, 6, 6, 9, 8, 9, 7, 9, 8, 9, 8, 9, 7, 10, 9, 9, 8, 9, 9, 11, 10, 10, 9, 11, 10, 11, 11, 11, 10, 9, 9, 6, 6, 7, 7, 11, 10, 12, 10, 12, 11, 12, 10, 14, 10, 13, 11, 11
Offset: 0

Views

Author

Rémy Sigrist, Jan 29 2020

Keywords

Examples

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

Crossrefs

See A331851 for similar sequences.

Programs

  • PARI
    See Links section.

Formula

a(2^k) = k+1 for any k >= 0.
a(2^k-1) = k for any k > 0.
Showing 1-4 of 4 results.