Maybe this can help?
Hey, Scripting Guy! How Can I Use a Script to Create a Sequential Series of User Accounts?