Another solution by a 11yo boy...(posted by his mom)

n = 1, 2, 3, 4, 5, 6, 7, 8, ......
nth term = [1][1,3][1,3,5,7][1,3,5,7,9,...][1,....]

The [1,3,5...] sequence would normally have this formula: 2n-1

Now, the sequence restarts when a binary number is reached.

eg for the 3rd interval
n=4,5,6,7
nth term=[1,3,5,7]

What needs to be done is to convert this n so that it starts at 1, and the formula 2n-1 can be used. To do that, we'll need to subtract n by the closest binary number that's smaller than n and add 1.

In this 3rd interval, the binary number is 4, so apply the formula (n-2^)+1

n=4,5,6,7 becomes
n=1,2,3,4 after we subtract n by 4 and add 1
we can now apply the earlier formula 2n-1 to get the nth term that we wanted.

So what we're doing is.
2((n-2^)+1)-1
--> 2(n-2^)+2-1
--> 2(n-2^)+1