Gould's sequence

Gould's sequence is an integer sequence named after Henry W. Gould that counts how many odd numbers are in each row of Pascal's triangle. It consists only of powers of two, and begins:
 * 1, 2, 2, 4, 2, 4, 4, 8, 2, 4, 4, 8, 4, 8, 8, 16, 2, 4, ...

For instance, the sixth number in the sequence is 4, because there are four odd numbers in the sixth row of Pascal's triangle (the four bold numbers in the sequence 1, 5, 10, 10, 5, 1). Gould's sequence is also a fractal sequence.

Additional interpretations
The $n$th value in the sequence (starting from $n = 0$) gives the highest power of 2 that divides the central binomial coefficient $$\tbinom{2n}{n}$$, and it gives the numerator of $$2^n/n!$$ (expressed as a fraction in lowest terms).

Gould's sequence also gives the number of live cells in the $n$th generation of the Rule 90 cellular automaton starting from a single live cell. It has a characteristic growing sawtooth shape that can be used to recognize physical processes that behave similarly to Rule 90.

Related sequences
The binary logarithms (exponents in the powers of two) of Gould's sequence themselves form an integer sequence,
 * 0, 1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 3, 2, 3, 3, 4, ...

in which the $n$th value gives the number of nonzero bits in the binary representation of the number $n$, sometimes written in mathematical notation as $$\#_1(n)$$. Equivalently, the $n$th value in Gould's sequence is
 * $$2^{\#_1(n)}.$$

Taking the sequence of exponents modulo two gives the Thue–Morse sequence.

The partial sums of Gould's sequence,
 * 0, 1, 3, 5, 9, 11, 15, 19, 27, 29, 33, 37, 45, ...

count all odd numbers in the first $n$ rows of Pascal's triangle. These numbers grow proportionally to $$n^{\log_2 3}\approx n^{1.585}$$, but with a constant of proportionality that oscillates between 0.812556... and 1, periodically as a function of $log n$.

Recursive construction and self-similarity
The first $2^{i}$ values in Gould's sequence may be constructed by recursively constructing the first $2^{i &minus; 1}$ values, and then concatenating the doubles of the first $2^{i &minus; 1}$ values. For instance, concatenating the first four values 1, 2, 2, 4 with their doubles 2, 4, 4, 8 produces the first eight values. Because of this doubling construction, the first occurrence of each power of two $2^{i}$ in this sequence is at position $2^{i} &minus; 1$.

Gould's sequence, the sequence of its exponents, and the Thue–Morse sequence are all self-similar: they have the property that the subsequence of values at even positions in the whole sequence equals the original sequence, a property they also share with some other sequences such as Stern's diatomic sequence. In Gould's sequence, the values at odd positions are double their predecessors, while in the sequence of exponents, the values at odd positions are one plus their predecessors.

History
The sequence is named after Henry W. Gould, who studied it in the early 1960s. However, the fact that these numbers are powers of two, with the exponent of the $n$th number equal to the number of ones in the binary representation of $n$, was already known to J. W. L. Glaisher in 1899.

Proving that the numbers in Gould's sequence are powers of two was given as a problem in the 1956 William Lowell Putnam Mathematical Competition.