Moser-de Bruijn Sequence

The sequence of numbers which are sums of distinct powers of 4. The first few are 0, 1, 4, 5, 16, 17, 20, 21, 64, 65, 68, 69, 80, 81, 84, ... (Sloane's A000695). These numbers also satisfy the interesting properties that the sum of their binary digits equals the sum of their quaternary digits, and that they have identical representations in binary and negabinary.

 

Binary, Negabinary, Quaternary




References

Allouche, J.-P. and Shallit, J. "The Ring of k-Regular Sequences." Theor. Comput. Sci. 98, 163-197, 1992.

de Bruijn, N. G. "Some Direct Decompositions of the Set of Integers." Math. Comput. 18, 537-546, 1964.

Moser, L. "An Application of Generating Series." Math. Mag. 35, 37-38, 1962.

Sloane, N. J. A. Sequences A000695/M3259 in "The On-Line Encyclopedia of Integer Sequences." http://www.research.att.com/~njas/sequences/.