You are working in the additive quotient group Z/9Z, therefore 9 is equivalent to 0, the additive neutro.
So, as said you cant use it until the last step, he completes the cicle.
Moreover, in any partial of the sumatory it cant be a multiple of 9.
Actually is a little bit more on it. When you use a slot, any of them, you are using the whole class, so when you use in example the 5 you cannot get any partial on a nine multiple plus 5.
This limits us as hell, but, is a start.
Let me work in a correct method to do this and some lections to extend this to Z/nZ, i suppose i will have to use ciclic groups and subgroups, but at the last i will be able to do it really fast with any group that has a solution and know just by looking if some n doesnt have it with proofs of it.
edit: so, that last thing should do for a simple coding, you take the sum, make a mod(9) (the rest of the integer divition) of it and if you get any number alredy picked then chose the next number....