If the coefficients of three consecutive terms in the expansion of (1+x)n are in the ratio 1:7:21, then the value of nn is:
a) 1
b) 3
c) 4
d) 7