f(1)=3*1-1=2
f(2)=3*2-1=5
f(3)=3*3-1=8
f(2017)=3*2017-1=6050
progresie aritmetică cu r=3
r=a2-a1=5-2=3
n=(an-a1)/r+1
n=(6050-2)/3+1
n=6048/3+1
n=2016+1
n=2017
S=(a1+an)*n/2=(2+6050)*2017/2=6052/2*2017=3026*2017=6103442