I would like to have a function that will create a word (always the same word) for a given sequence number based on a given alphabet.
word(0, [a,b,c]) = a
word(1, [a,b,c]) = b
word(2, [a,b,c]) = c
word(3, [a,b,c]) = aa
word(4, [a,b,c]) = ab
word(5, [a,b,c]) = ac
word(6, [a,b,c]) = ba
word(7, [a,b,c]) = bb
word(8, [a,b,c]) = bc
word(9, [a,b,c]) = ca
...
I was able to recursively create all permutations of a given length but starting with length 5 it already gets quite big in memory.