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.

A344345 Digitally balanced numbers in Gray code: numbers whose binary reflected Gray code has the same number of 0's as 1's.

Original entry on oeis.org

3, 8, 12, 14, 33, 35, 39, 47, 49, 51, 55, 57, 59, 61, 130, 132, 134, 136, 140, 142, 144, 152, 156, 158, 160, 176, 184, 188, 190, 194, 196, 198, 200, 204, 206, 208, 216, 220, 222, 226, 228, 230, 232, 236, 238, 242, 244, 246, 250, 517, 521, 523, 525, 529, 531, 535
Offset: 1

Views

Author

Amiram Eldar, May 15 2021

Keywords

Examples

			8 is a term since its Gray code, 1100, has 2 0's and 2 1's.
33 is a term since its Gray code, 110001, has 3 0's and 3 1's.
		

Crossrefs

Similar sequences: A031443 (binary), A210619 (Zeckendorf), A342727 (base i-1).

Programs

  • Mathematica
    gc[n_] := gc[n] = If[n <= 1, n, 2^(b = Floor@Log2[n]) + gc[2^(b + 1) - 1 - n]]; gcDigBalQ[n_] := Equal @@ DigitCount[gc[n], 2, {0, 1}]; Select[Range[500], gcDigBalQ]