设数列{an}的前n项和为Sn,若对任意正整数,都有Sn=n(a1+an)/2,证明{an}是等差数列.