How many integers from 10 to 40 can be written as the sum of 2 consecutive integers?

How many integers from 10 to 40 can be written as the sum of 3 consecutive integers?

How many integers from 10 to 40 can be written as the sum of 4 consecutive integers?

Can you find a pattern? Explain.