edited documentation added parameters section to doc

Also reverted back to direct implementation of series sum rather than
using summation as I believe it is a more straightforward approach and
is similar to how totient is implemented.