FERMAT 2006 Problem 17

In seven term sequence, 5,p,q,13,r,40,x, each term after the third term is the sum of the preceding three terms. The value of x is

Answer Choices
A. 21
B. 61
C. 67
D. 74
E. 80