Helpers for solving Project Euler problems