Вычислить сумму 1*2+2*5+3*8+...+n*(3*n-1)
1(3*1 -1) +2(3*2 -1)+3(3*3 -1) + ..... +n(3*n -1) = =3(1²+2² +3² +...... +n²) - (1+2+3+ .... +n) =3* n(n+1)(2n+1)/6 -n(n+1)/2=n²(n+1).