已知数列{an}中,a1a2a3.an=n2+n,求通项公式an