This study considers a (q,r) inventory control system in which the distribution of demand can be modeled by a statistical form and the replenishment lead time is affected by manufacturing learning and forgetting. The learning effect is assumed to follow a power function, and the forgetting effect is a fraction of the learning lost between consecutive production runs. We calculate the replenishment lead time for each order by incorporating these effects into both the setup time and unit production time. After the expected total cost function during the finite planning horizon is formulated, three propositions that a feasible solution must satisfy are addressed. According to these propositions, an exhaustive search algorithm giving the optimal solution with integer decision variables, including order numbers, order sizes, and the reorder level, is then derived. The proposed algorithm is illustrated by means of a numerical example with gamma-distributed demand. A sensitivity analysis is also conducted with respect to cost, learning, and forgetting parameters. Computational results indicate that the learning and forgetting effects on the expected total cost depend on the variations in the order number and the order size. The computational time required to obtain the optimal solution is extremely sensitive only to the production learning.