Generate Pattern 2, 33, 222, 5555, 22222, 777777 using constraints

In reply to bachan21:

Since this is not really a random pattern, you should be able to debug your function alone by single stepping or printing intermediate results.