What's the next term in this sequence?

1, 2, 1, 3, 1, 4, 2, 5, 1, 6, 2, 3, 7, 8, 4, 3, 1, 9, 2, 10, 5

What's the pattern?

I've had no takers, so here's a big hint:

1,2,3,4,5,6,7,8,9,...
1,2,1,3,4,2,5,6,3,7,8,4,...
1,2,1,3,1,4,2,5,6,2,3,7,8,4,3,...

· · Web · · ·

@christianp I had no idea yesterday, but now it's clear.

@SylviaFysica so what's the next term?

@christianp Urgh.

Does it arise "naturally" from something interesting? It has a little of the flavour of the Thue–Morse sequence, which turns up in lots of places.

@ColinTheMathmo it didn't for me - it was inspired by seeing a sentence along the lines of "for each natural number, you have infinitely many balls", and thinking about how you'd stuff infinitely many copies of the natural numbers together

@christianp Huh. I'd do a tighter interleaving, rather than 2 of each, then 4 of each, etc., but I can see how it arises from that.

Is it in the OEIS?

Should it be in the OEIS?

It's very ... parameterisable(?), so maybe not.

@ColinTheMathmo it's not in the OEIS. I was thinking earlier today about how you could make it tighter. Lots of reasonable-looking options end up producing infinite strings of 1s! But there's defo a way of packing them that puts the 1s closer togethee

@christianp @ColinTheMathmo I played with a few weavings this evening and I found one that is in the OEIS. 1,1,2,1,2,1,3,1,3,1,1,1,4,1,4,1,1,1,5,1,2,... oeis.org/A137163

@christianp @ColinTheMathmo As far as I can see this weaving has no more justification to be in the OEIS than yours. :)

The first iteration step of your weave is in the OEIS though: oeis.org/A009947

I find it slightly more natural to start your power-of-2 weave one position earlier, even though it looks funny with all the doublets. 1,1,2,2,1,3,3,4,1,4,1,5,5,6,6,2,1,7,1,7,8,8,2,9,9,... (This one isn't in the OEIS either.)

@christianp even with the hint I could not see it. Woo :)

The social network of the future: No ads, no corporate surveillance, ethical design, and decentralization! Own your data with Mastodon!