calculate maxn a posteriori from the actual maximum term that is not discarded in the sum.
bind arguments instead of calling after recursion to cleanup stack trace