Question: If statement within sequence or list creation

Hi I am not very used to Maple since I used mathematica previously.

So is there way to put an if statement within sequecne definition? that is,


id = 1;

seq(if(i>2, idx += 1), idx+i , i=1..10)


something like this where if statement runs and then idx+i is added to the sequence, as if I am running a loop.


Please Wait...