We have been given the sequence 2,3,5,9,17.
We can write the terms of this sequence as

From the above term we can see that for the first term we take exponent 0 on 2 and then add 1 .
For second term we take exponent 1 on 2 and then add 1 .
For third term we take exponent 2 on 2 and then add 1 .
Using this fact for the next term of the sequence i.e. 6th term, we can take exponent 5 on 2 and then add 1 .
Therefore, next term of the sequence is given by

Therefore, the next term is 33.
Using the above facts, the pattern is given by
