recursive equation for exponential function