A previous question asked for the solutions in lexical order (lowest to highest) to
a+b+c+d… = x
where a,b,c,d… is an arbitrary number of integers between 0-999 and x is a fixed integer
An answer was given which fully computes this efficiently using python.
However, for very large numbers, the loop could take years to complete.
For example, the huge number:
304,153,525,784,175,759
is a solution for x=2700
since the groups of threes add up to 2700
304+153+525+784+175+759 = 2700
However, to loop through the algorithm to get the nth solution which equals this number would take months or years.
Is there a way to calculate the nth solution directly? I.e. for a known solution, to calculate how many solutions are less than this one.