若{an}为等比数列,公比q>0,a1=3,s3=21,求an