function t=fn(n);
m=3;
t=1:n;
a=1;
j=1;
ind=0;
while a<n
    while j<m
        ind =ind + 1;
        if ind > length(t)
            ind=1;
        end
        j=j+1;
    end
    t(ind)=[]
    ind=ind-1;
    j=1;
    a=a+1;
end
t
