# You can post this online. #NuGames1(n): the number of games of size n where always #there is at most one option: NuGames1:=proc(n) local m: #every game is [L,R] let Size(L)=m option remember: if n=0 then RETURN(1): fi: add(NuGames1(m)*NuGames1(n-1-m),m=0..n-1): end: # I am convinced that NuGames1 is okay. #RollLD(L): Given a Loaded die, L, rolls it, try: #RollLD([1,3,2]); RollLD:=proc(L) local i,r,N: N:=convert(L,`+`): r:=rand(1..N)(): for i from 1 to nops(L) while convert([op(1..i,L)],`+`)