The correct option is B n(3n2−3n+2)2
Let the numbers be written as follows:
3k:3,6,9,12,...3n−−−−−−−(i)
3k−1:2,5,8,11,...3n−1−−−−−(ii)
3k−2:1,4,7,10,...3n−2−−−−−(iii)
Each of the above 3 series has n terms.
Case A: select 3 terms from only series (i) or (ii) or (iii) in: nC3×3=n(n−1)(n−2)2
Case B: select 1 term from each of the 3 series in: (nC1)3=n3
Hence, required value = n(n−1)(n−2)2+n3=n(3n2−3n+2)2
Hence, (B) is correct.