设数列{a n }的前n项和为S n ,已知S n =2a n ﹣2n+1(n∈N*).