Initial solution to problem 6
Use math to improve efficiency

(Consecutive squares differ by consecutive odd numbers.)