The correct options are
A f(30)=960
B f(21)=483
f(n)=n∑r=1[r2(nCr−nCr−1)+(2r+1)(nCr)]⇒f(n)=n∑r=1[(r2+2r+1)nCr−r2⋅nCr−1]⇒f(n)=n∑r=1[(r+1)2⋅nCr−r2⋅nCr−1]⇒f(n)=n∑r=1(Tr+1−Tr)⇒f(n)=(T2−T1)+(T3−T2)+(T4−T3)+⋯+(Tn+1−Tn)⇒f(n)=(Tn+1−T1=(n+1)2⋅nCn−1=(n2+2n)∴f(30)=960 and f(21)=483.