The sequence 1, 2, 3, 4, 5, 6, 8, 9, 10, 12, 16, . . . is formed from all positive integers that are either a power of 2 or a sum of two distinct powers of 2. Find the 200th term of this sequence.
Ironically, the previous solutions using a computer seemed to not notice how writing the sequence in binary pretty much tells you everything.
1, 10, 11, 100, 101, 110, 1000, 1001, 1010, 1100, 10000, ...
There's one 1-bit number, two 2-bit numbers, three 3-bit numbers, etc.
So then the indices of the triangular numbers tell you where each block ends; the n-th triangular number is the end of the n-bit members of the sequence. That number at the end of the nth block can be expressed as 2^(n-1)+2^(n-2).
The 19th triangular number is 19*20/2 = 190. Then the 190th term is 2^18+2^17.
The 191st term is then the next power of 2: 2^19.
Then there are 9 more terms to go to get to the 200th term, which will have 2^0 through 2^8 added to 2^19. Then the 200th term is 2^19+2^8 = 524544.