Q. If and where and then

 148  146 Sequences and Series Report Error

Solution:

Using A.M. G.M.