It is known that a2=3, A4, A5 and A8 make geometric series.
So a 1+d=3.
(a 1+3d)(a 1+7d)=(a 1+4d)^2
D=-2,a 1=5。
So the general formula of an is 7-2n.