The difference between any two consecutive odd numbers is 2.
Let the smallest number be x.
The other three numbers are x + 2, x + 4, x + 6.
Their sum is 40.
x + x + 2 + x + 4 + x + 6 = 40
4x + 12 = 40
4x = 28
x = 7
The second number is x + 2 = 7 + 2 = 9.
Answer: 9