Subject :IMO Class : Class 7

Find the missing number to complete the given number series.

1, 2, 5, 7, 9, 12, 13, 17, __?__

A 22

B 20

C 17

D 19

im confused with the answer.. what was the rule for the pattern?