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.

A330959 For any n >= 0: consider all pairs of numbers (x, y) whose binary representations can be interleaved (or shuffled) to produce the binary representation of n (possibly with leading zeros); a(n) is the least possible value of x XOR y (where XOR denotes the bitwise XOR operator).

Original entry on oeis.org

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

Views

Author

Rémy Sigrist, Jan 04 2020

Keywords

Examples

			For n = 5:
- the binary representation of 5 is "101",
- the possible values for (x, y), restricted to x >= y without loss of generality, are:
  bin(5)   x  y  x XOR y
  -------  -  -  -------
  "101"    5  0        5
  "1/01"   1  1        0
  "10/1"   2  1        3
  "1/0/1"  3  0        3
- hence a(5) = 0.
		

Crossrefs

See A330925 for similar sequences.
Cf. A327187.

Programs

  • C
    See Links section.