I would consider it idiomatic to write `for i = 2:n` – spaces in the range look odd and using Matlab-style `=` in the for loop. I use `in` when the right-hand-side is a variable name or expression.