Q. If and where and then

 153  146 Sequences and Series Report Error

Solution:

Using A.M. G.M.