等差数列an中,已知d=2.5,an=27,sn=157.5,求a1及n.