i <- 2 1:i-1 # this means (1:i) - 1, not 1:(i-1) #[1] 0 1 1:(i-1)