In reply to Rick Wicklin.

Thanks for your suggestion. I've already done it for N=25 using a combination of allcomb and allperm functions. But I need it for N=100. That's the problem. But if we don't store the whole permutation in a dataset and at the time of each permutation generation, if a function of that permutation is calculated and summed to a variables.

Is it possible? Then only my problem would be solved.
With regards,