Algorithms implementing Project Euler problems