While the first couple of responses outline the rules, here are a couple of DATA steps you can play with to try to get the idea:
data _null_;
do k=1 to 7 by 4;
put k=;
end;
put k=;
run;
data _null_;
do k=1 to 9 by 4;
put k=;
k = k + 1;
put k=;
end;
put k=;
run;
... View more