Code from project euler challenges