read `1234Avoid.txt`: N:=10: K:=5: R:=2: t0:=time(): print(`The first`, N, `terms of the sequences of words in {1,...n} with`, r, `occurrences of each letter, avoiding the pattern 1234`): print(`and the pattern 1k(k-1)...2 for r from 1 to`, R, `and for k from 3 to `, K): print(``): print(`By Yonah B-A's computer`): print(``): for k from 3 to K do print(``): print(`-------------------------------------------`): print(``): for r from 1 to R do print(``): print(`-------------------------------------------`): print(``): print(`The first`, N, `terms of the sequence enumerating the number of words in {1,...n} with`, r , `occurrences of each letter`): print(`avoiding the pattern 1234 and the pattern`, cat(1,seq(k-i1,i1=0..k-2)) , `are `): gu:=[seq(Count1234PlusAvoiders(r,k,n1),n1=1..N)]: print(``): print(gu): print(``): print(`The time is`, time()-t0): print(``): od: od: print(``): print(`-----------------------`): print(``): print(`The whole thing took`, time(), `seconds. `): quit: