Q. If and where and then

 161  154 Sequences and Series Report Error

Solution:

Using A.M. G.M.