This should result in a time series with length 5, but gives length 6:
> arima.sim(model=list(), n=5)
Start = 1
End = 6
Frequency = 1
 NA 0.830040023 -1.622808195 -0.006672163 0.340905781
Caused by using 1L:n.start instead of seq_len(n.start) in two places (1L:n could also be replaced with seq_len(n)).
system i686, linux-gnu
svn rev 59600
version.string R version 2.15.1 (2012-06-22)
nickname Roasted Marshmallows
I'm not sure that really is an ARIMA model, but we'll adapt it to work in that case.
Note that seq_len came many years later.