calculate values for all n (n_min to n_max)