What is the next number in this sequence?

1,2,5,10,17,26,37,?

The increase is the set of odd numbers

that is,
1
1+1 = 2
2 + 3 = 5
5 + 5 = 10
10 + 7 = 17
17 + 9 = 26
26 + 11 = 37
so
37 + 13 = 40

btw,
term(n) = n^2 - 2n + 2 , where n is a whole number