What number comes next in 2, 4, 5, 3, 10, …

2, 4, 5, 3, 10, 11, 13, 7, 5, 28, 29, 31, 35, ???

I tried plugging it into Wolfram Alpha which couldn't find any pattern, and I'm still not too sure how to determine what number comes next. Any ideas?

The puzzle is from The Ultimate Puzzle Book. Unfortunately, I do not have access to the solution as I do not actually own the book.

It's grouped like this

(2), (4,5,3), (10,11,13,7,5), (28,29,31,35,?,?,?)


For $$i$$th group , it is $$3^i+2^j$$, with $$j$$ increases from 0 to $$i$$
and then $$3^j+2^i$$, with $$j$$ decrease from $$i-1$$ to 0 There is the write down
$$\ \ 2=3^0+2^0 \\ \ \ 4=3^1+2^0,\ \ 5=3^1+2^1,\ \ 3=3^0+2^1 \\ 10=3^2+2^0, 11=3^2+2^1, 13=3^2+2^2,\ \ 7=3^1+2^2, 5=3^0+2^2 \\ 28=3^3+2^0, 29=3^3+2^1, 31=3^3+2^2, 35=3^3+2^3$$
And to complete the last group, it should be:
$$3^2+2^3=17, 3^1+2^3=11, 3^0+2^3=9$$, i.e, next three will be 17,11,9

This looks like several different sequences combined to me:

The total sequence is:

2, 4, 5, 3, 10, 11, 13, 7, 5, 28, 29, 31, 35

But that can be split into, with some of the intermediary numbers dropped

2, 4, 5, 10, 11, 13 and 28, 29, 31, 35

Each of these groups follow a $$2^{n-1}$$ pattern:

$$1 + 2^{1-1} = 1 + 1 = 2$$

$$3 + 2^{1-1}, 3 + 2^{2-1} = 3 + 1, 3 + 2 = 4, 5$$

$$9 + 2^{1-1}, 9 + 2^{2-1}, 9 + 2^{3-1} = 9 + 1, 9 + 2, 9 + 4 = 10, 11, 13$$

$$27 + 2^{1-1}, 27 + 2^{2-1}, 27 + 2^{3-1}, 27 + 2^{4-1} = 27 + 1, 27 + 2, 27 + 4, 27 + 8 = 28, 29, 31, 35$$

With the offsets ($$1, 3, 9, 27$$) are growing as $$3^{p-1}$$ , where p is the group number

Now the 'gaps' appear at positions 4 (1 number, $$3$$) and starting at 8 (2 numbers, $$7, 5$$). These seem to follow a strange pattern of $$position(4) - 1 = 3$$, and then $$position(8) - 1, position(9) - 4 = 7, 5$$.

Now if the gaps were at a multiple of 4, then the third gap would be at position 12, (and I guess it would be $$11, 8, 0$$ or $$11, 8, -1$$ depending on how our subtraction variable scales!)

But we have a valid sequence at position 12, so the next gap must be position 16 (growing exponentially), so instead I believe we have these as the next numbers in the sequence:

$$81 + 2^{1-1}, 81 + 2^{2-1}, 81 + 2^{3-1}, 81 + 2^{4-1}, 81 + 2^{5-1} = 81 + 1, 81 + 2, 81 + 4, 81 + 8 = 82, 83, 85, 89, 97$$

However that interrupts out declining series, which would be $$position(16) - 1, position(17) - 4, position(18) - 8 = 15, 13, 10$$

So I can't predict past #14, but the 14th number is definitely 82, if I am correct in my reasoning.

• This looks correct but explained in a complicated way. It boils down to $3^{i} + 2^{j}$ for all i,j with $j \le i$ listed by row. Commented Oct 16, 2021 at 13:49
• @florianf... I hadn't spotted that. Feel free to post as an answer, I'd upvote it Commented Oct 16, 2021 at 13:57
• @FlorianF I'm not sure agree, but even if I did rewrite the second part of my question, it might take me some time to fully get my head around how you've explained it Commented Oct 16, 2021 at 15:25
• I reread the question and realized I commented a bit hastily. My comment is nonsense. I don't know what the 3 and 7,5 are doing there. Commented Oct 16, 2021 at 17:49