I tried doing the following:
nestedseq:=proc(numtimes,middle)
return cat(seq(`seq(`,i=1..numtimes),middle,seq(`,j[i]=[1,2,3])
`,i=1..numtimes));
end proc;
But then I get a string with the desired command but I cannot evaluate
it. Is there a better way to do these iterated sequences?
Thanks a lot,
I think the problem here is that "middle" is messing up the syntax of
the outermost seq. Try the following:
seq(op([seq(something, i=1..numtimes), middle, seq(something_else, j=
[1,2,3])]), k=1..numtimes);