initial solution euler #14, could be optimized