private static double momentGeneratingFunction(int n, double a, double b) { return (b * Beta.Function(1.0d + ((double)n) / a, b)); }