已知等差数列{an}满足:a3=7,a5+a7=26,{an}的前n项和为Sn.求an及Sn.