设数列{an}的前几项和为Sn=n^2-4n+1则通项公式an?