a2+a4=2a1+4d=6 ->a1+2d=3->a1=3-2d
sn=a1n+n(n-1)d/2=7a1+21d=7(3-2d)+21d=21+7d=28,d=1
a1=1
an=a1+(n-1)d=1+(n-1)1=n