设数列{an}的前n项和为Sn,且Sn=2^n-1.求数列{an}的通项公式!