You need to run with BASH, so use BASH shebang:
#!/bin/bash
Since this arithmetic BASH loop syntax isn't supported in older bourne shell:
arithmetic BASH loop syntax
older bourne shell
for ((i = 0; i<=5; i++)); do echo "$i"done