i don't recommend using curly braces on arrays as they only work with strings, if you pass $n as an integer it will fail