The first way of working it out is to square each number in order (0, 1, 2, 3, 4, 5) and each time, add one.
The second way is to add each odd number in order (1, 3, 5, 7, 9) to the previous term.
The next number in this pattern is 37. The pattern will go like 2,5,10,17,26,37,50,65….