Replace "_seq" function with c-style "for" loops

Quoting from http://wiki.bash-hackers.org/syntax/ccmd/c_for : "C-style for loops aren't POSIX. They are available in Bash, ksh93, and zsh. All 3 have essentially the same syntax and behavior."