A generalized theorem on mean values of an analytic function and an algorithm for the evaluation of mean values - A. M. Samoilenko (Ukrainian Mathematical Journal, 2017)