Write the positive integer n in binary. Subdivide the binary n into runs each consisting entirely of 0s or of 1's, where the runs alternate between those of 1s and those of 0s. The sequence gives those numbers n such that there is at least one run of 1s of the same length as at least one run of 0s.

25 written in binary is 11001. The runs are (11)(00)(1). Since at least one run of 1's (the leftmost run here) is the same length as at least one run of 0s (the only run of 0s here), 25 is included in this sequence.