hink you need recursion to modify the random seed; many other ways to accomplish that (use the length of each curve as the seed, for example).
Using multiples of twelve makes it harder for me to grasp the essence of the matter; another way of looking at it is that you want to generate random integers from 2 to 5 (24,36, 48 and 60) and have them add up exactly to curve lengths of 5 (x12=60), 9 (x12=108) or 14 (x12=168).
So you want to generate random numbers until their sum ('Mass Addition') plus 5 is equal to or greater than the curve length (5, 9 or 14). The last number in the series is then not random but just the difference between the two.
For example, for curve length = 5 (x12=60), there are only three possible numbers that can be used as the first in the sequence: 2, 3 or 5. If it's 5, you're done. If it's 2, the second number is 3 (5-2), if it's 3, the second number is 2 (5 - 3). You can't use '4' at all because the remainder, 1 (x12=12) isn't one of your solution options.
There is no point in generating the last number randomly, eh?
P.S. You didn't use 'Internalize data' for the 'Curve (Crv)' param in your GH file.…
Added by Joseph Oster at 2:29pm on September 12, 2015