OptionalaFactor by which to multiply n.
OptionalbValue to add to the scaled value of n.
The value on which to perform the Collatz-esque function
OptionalmaxMaximum amount of times to iterate the function, if 1 is not reached.
OptionalPModulus used to devide n, iff n is equivalent to (0 mod P).
OptionaltotalWhether or not to execute until the "total" stopping time (number of iterations to obtain 1) rather than the regular stopping time (number of iterations to reach a value less than the initial value).
Parameterised inputs
Remarks
Allows non-default (P,a,b); and other options.