AMC 10B 2004 Problem 21

Let 1,4, \ldots and 9,16, \ldots be two arithmetic progressions. The set S is the union of the rst 2004 terms of each sequence. How many distinct numbers are in S ?

Answer Choices
A. 3722
B. 3732
C. 3914
D. 3924
E. 4007