\(\text{S = 1 x 2 +2x3 + 3x4+... + 38x39+39x40 }\)
\(\text{3S= 1.2.3+2.3.3+3.4.3+...+38.39.3+39.40.3}\)
\(\text{3S=1.2.(3-0)+2.3(4-1)+...+38.39(40-37)}\)
\(\text{3S=0.1.2-1.2.3+1.2.3-2.3.4+...+37.39.39-38.39.40}\)
\(\text{3S=38.39.40 S=19760 }\)
S=1*2+2*3+3*4+4+.............................+38*39+3
=> S = 19760