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
(A) 21
(B) 61
(C) 67
(D) 74
(E) 80
Since each term after the third is the sum of the preceding three terms, then, looking at the fourth term, $13=5+p+q$ or $p+q=8$.

Looking at the fifth term, $r=p+q+13=8+13=21$.

Looking at the seventh term, $x=13+r+40=13+21+40=74$.

ANSWER: (D)